-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)NLL-diagnosticsWorking towards the "diagnostic parity" goalWorking towards the "diagnostic parity" goal
Description
This code (play)
struct S;
pub fn main() {
let _y = { static x: S = S; x };
}
issues the following diagnostics under migrate mode:
error[E0507]: cannot move out of static item
--> src/main.rs:3:33
|
3 | let _y = { static x: S = S; x };
| ^
| |
| cannot move out of static item
| help: consider borrowing here: `&x`
error[E0507]: cannot move out of immutable static item `x`
--> src/main.rs:3:33
|
3 | let _y = { static x: S = S; x };
| ^
| |
| cannot move out of immutable static item `x`
| cannot move
error: aborting due to 2 previous errors
It issues only a single error under either of AST-borrowck or pure NLL.
Metadata
Metadata
Assignees
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)NLL-diagnosticsWorking towards the "diagnostic parity" goalWorking towards the "diagnostic parity" goal