Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/core/lifetime.d
Original file line number Diff line number Diff line change
Expand Up @@ -1915,7 +1915,7 @@ pure nothrow @safe @nogc unittest
static assert(is(typeof({ S s; move(s, s); }) == T));
}

private void moveImpl(T)(scope ref T target, return ref T source)
private void moveImpl(T)(scope ref T target, return scope ref T source)
{
import core.internal.traits : hasElaborateDestructor;

Expand All @@ -1930,7 +1930,7 @@ private void moveImpl(T)(scope ref T target, return ref T source)
moveEmplaceImpl(target, source);
}

private T moveImpl(T)(ref T source)
private T moveImpl(T)(return scope ref T source)
{
// Properly infer safety from moveEmplaceImpl as the implementation below
// might void-initialize pointers in result and hence needs to be @trusted
Expand All @@ -1939,7 +1939,7 @@ private T moveImpl(T)(ref T source)
return trustedMoveImpl(source);
}

private T trustedMoveImpl(T)(ref T source) @trusted
private T trustedMoveImpl(T)(return scope ref T source) @trusted
{
T result = void;
moveEmplaceImpl(result, source);
Expand Down