Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 246d15a

Browse files
authored
Merge pull request #3132 from WalterBright/returnPure
add return annotations to pure functions merged-on-behalf-of: Mathias LANG <[email protected]>
2 parents 435ae8a + 456d8eb commit 246d15a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/rt/cast_.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pure:
2525
* If it is null, return null.
2626
* Else, undefined crash
2727
*/
28-
Object _d_toObject(void* p)
28+
Object _d_toObject(return void* p)
2929
{
3030
if (!p)
3131
return null;

src/rt/lifetime.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ size_t __arrayAllocLength(ref BlkInfo info, const TypeInfo tinext) pure nothrow
398398
/**
399399
get the start of the array for the given block
400400
*/
401-
void *__arrayStart(BlkInfo info) nothrow pure
401+
void *__arrayStart(return BlkInfo info) nothrow pure
402402
{
403403
return info.base + ((info.size & BIGLENGTHMASK) ? LARGEPREFIX : 0);
404404
}

0 commit comments

Comments
 (0)