5 fail_compilation/dip1000_deprecation.d(17): Deprecation: `@safe` function `main` calling `inferred`
6 fail_compilation/dip1000_deprecation.d(25): which wouldn't be `@safe` because of:
7 fail_compilation/dip1000_deprecation.d(25): scope variable `x0` may not be returned
8 fail_compilation/dip1000_deprecation.d(19): Deprecation: `@safe` function `main` calling `inferredC`
9 fail_compilation/dip1000_deprecation.d(36): which calls `dip1000_deprecation.inferred`
10 fail_compilation/dip1000_deprecation.d(25): which wouldn't be `@safe` because of:
11 fail_compilation/dip1000_deprecation.d(25): scope variable `x0` may not be returned
18 cast(void)inferredB(); // no deprecation, trusted
19 cast(void)inferredC(); // nested deprecation
28 auto inferredB() @trusted
36 return inferred(); // no deprecation, inferredC is not explicit `@safe`
44 int* incorrectReturnRef() scope return @trusted {return ptr
;}
47 S
createS() { return S
.init
; }
51 if (i
) return S().incorrectReturnRef();
52 if (i
) return createS().incorrectReturnRef();
55 return s
.incorrectReturnRef();