Collect late-bound regions from all closure parents in closure_mapping
This commit is contained in:
parent
630dff6ba7
commit
f27bdf1750
4 changed files with 91 additions and 40 deletions
9
src/test/ui/closures/binder/nested-closures-regions.rs
Normal file
9
src/test/ui/closures/binder/nested-closures-regions.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// check-pass
|
||||
|
||||
#![feature(closure_lifetime_binder)]
|
||||
#![feature(rustc_attrs)]
|
||||
|
||||
#[rustc_regions]
|
||||
fn main() {
|
||||
for<'a> || -> () { for<'c> |_: &'a ()| -> () {}; };
|
||||
}
|
||||
38
src/test/ui/closures/binder/nested-closures-regions.stderr
Normal file
38
src/test/ui/closures/binder/nested-closures-regions.stderr
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
note: external requirements
|
||||
--> $DIR/nested-closures-regions.rs:8:24
|
||||
|
|
||||
LL | for<'a> || -> () { for<'c> |_: &'a ()| -> () {}; };
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: main::{closure#0}::{closure#0} with closure substs [
|
||||
i8,
|
||||
extern "rust-call" fn((&(),)),
|
||||
(),
|
||||
]
|
||||
= note: late-bound region is '_#4r
|
||||
= note: late-bound region is '_#2r
|
||||
= note: number of external vids: 3
|
||||
= note: where '_#1r: '_#2r
|
||||
= note: where '_#2r: '_#1r
|
||||
|
||||
note: no external requirements
|
||||
--> $DIR/nested-closures-regions.rs:8:5
|
||||
|
|
||||
LL | for<'a> || -> () { for<'c> |_: &'a ()| -> () {}; };
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: main::{closure#0} with closure substs [
|
||||
i8,
|
||||
extern "rust-call" fn(()),
|
||||
(),
|
||||
]
|
||||
= note: late-bound region is '_#2r
|
||||
|
||||
note: no external requirements
|
||||
--> $DIR/nested-closures-regions.rs:7:1
|
||||
|
|
||||
LL | fn main() {
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: main
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue