-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)NLL-diagnosticsWorking towards the "diagnostic parity" goalWorking towards the "diagnostic parity" goalT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
This code (play):
struct S;
pub fn main() {
let x = S;
let _y = *&x;
}
issues the following diagnostics under migrate mode:
error[E0507]: cannot move out of borrowed content
--> src/main.rs:4:14
|
4 | let _y = *&x;
| ^^^
| |
| cannot move out of borrowed content
| help: consider removing the `*`: `&x`
error[E0507]: cannot move out of data in a `&` reference
--> src/main.rs:4:14
|
4 | let _y = *&x;
| ^^^
| |
| cannot move out of data in a `&` reference
| 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" goalT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.