Rollup merge of #80629 - sexxi-goose:migrations_1, r=nikomatsakis
Add lint for 2229 migrations Implements the first for RFC 2229 where we make the decision to migrate a root variable based on if the type of the variable needs Drop and if the root variable would be moved into the closure when the feature isn't enabled. r? `@nikomatsakis`
This commit is contained in:
commit
a1887912e8
10 changed files with 812 additions and 53 deletions
|
|
@ -7,10 +7,10 @@ LL | let mut closure1 = || p = &y;
|
|||
= note: defining type: test::{closure#0}::{closure#0} with closure substs [
|
||||
i16,
|
||||
extern "rust-call" fn(()),
|
||||
(&'_#1r i32, &'_#2r mut &'_#3r i32),
|
||||
(&'_#1r mut &'_#2r i32, &'_#3r i32),
|
||||
]
|
||||
= note: number of external vids: 4
|
||||
= note: where '_#1r: '_#3r
|
||||
= note: where '_#3r: '_#2r
|
||||
|
||||
note: external requirements
|
||||
--> $DIR/escape-upvar-nested.rs:20:27
|
||||
|
|
@ -25,10 +25,10 @@ LL | | };
|
|||
= note: defining type: test::{closure#0} with closure substs [
|
||||
i16,
|
||||
extern "rust-call" fn(()),
|
||||
(&'_#1r i32, &'_#2r mut &'_#3r i32),
|
||||
(&'_#1r mut &'_#2r i32, &'_#3r i32),
|
||||
]
|
||||
= note: number of external vids: 4
|
||||
= note: where '_#1r: '_#3r
|
||||
= note: where '_#3r: '_#2r
|
||||
|
||||
note: no external requirements
|
||||
--> $DIR/escape-upvar-nested.rs:13:1
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ LL | let mut closure = || p = &y;
|
|||
= note: defining type: test::{closure#0} with closure substs [
|
||||
i16,
|
||||
extern "rust-call" fn(()),
|
||||
(&'_#1r i32, &'_#2r mut &'_#3r i32),
|
||||
(&'_#1r mut &'_#2r i32, &'_#3r i32),
|
||||
]
|
||||
= note: number of external vids: 4
|
||||
= note: where '_#1r: '_#3r
|
||||
= note: where '_#3r: '_#2r
|
||||
|
||||
note: no external requirements
|
||||
--> $DIR/escape-upvar-ref.rs:17:1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue