2 ms·
Thanks. Indeed it needs the attribute like `@safe: S* foo() {` (and `-dip1000` seems to be unnecessary with it).
by Arnavion 8y ago
Thanks. Indeed it needs the attribute like `@safe: S* foo() {` (and `-dip1000` seems to be unnecessary with it).
- Arnavion 8y agoTo correct my comment: `-dip1000` is still needed because `@safe` is overly restrictive. `@safe` prevents taking the address of `s` entirely regardless of how it's used, so `-dip1000` is needed to allow it when it's safe (such as using `&s` without letting it escape scope).