std.container.rbtree: Fix -dip1000 compilable issues (alternative)#6362
std.container.rbtree: Fix -dip1000 compilable issues (alternative)#6362wilzbach wants to merge 1 commit intodlang:masterfrom
Conversation
|
Thanks for your pull request, @wilzbach! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + phobos#6362" |
b2a989d to
8b8b484
Compare
|
is scope transitive? If so, then it's going to be impossible to work with this. For example, the ctor that accepts a stack-allocated list of elems must be declared scope (the array is on the stack after all), but the elements themselves may not be if they point at non-scope data (such as strings). |
|
scope is not transitive |
|
@WalterBright you need to approve PRs at druntime & Phobos before/when adding auto-merge. |
8b8b484 to
ca6f1be
Compare
It sure seems like it is. If I mark a parameter @safe:
void noscope(string s) {}
void test(scope string[] arr) {
noscope(s[0]); // Error: scope variable arr assigned to non-scope parameter s calling testscope.noscope
}How do we identify that the strings inside |
|
Superseded by #6931 |
Alternative version to: #6332
Still not perfect and I don't know why this is disallowed:
but this is allowed: