2017-12-05 12:15:23 -06:00
|
|
|
warning: not reporting region error due to -Znll
|
|
|
|
--> $DIR/projection-no-regions-closure.rs:36:31
|
|
|
|
|
|
|
|
|
36 | with_signature(x, |mut y| Box::new(y.next()))
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
warning: not reporting region error due to -Znll
|
|
|
|
--> $DIR/projection-no-regions-closure.rs:54:31
|
|
|
|
|
|
|
|
|
54 | with_signature(x, |mut y| Box::new(y.next()))
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
note: External requirements
|
|
|
|
--> $DIR/projection-no-regions-closure.rs:36:23
|
|
|
|
|
|
|
|
|
36 | with_signature(x, |mut y| Box::new(y.next()))
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/1:15 ~ projection_no_regions_closure[317d]::no_region[0]::{{closure}}[0]) with closure substs [
|
|
|
|
'_#1r,
|
|
|
|
T,
|
|
|
|
i32,
|
|
|
|
extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<Anything + '_#2r>
|
|
|
|
]
|
|
|
|
= note: number of external vids: 3
|
|
|
|
= note: where <T as std::iter::Iterator>::Item: '_#2r
|
|
|
|
|
2017-12-19 10:12:56 -06:00
|
|
|
error[E0309]: the associated type `<T as std::iter::Iterator>::Item` may not live long enough
|
2017-12-05 12:15:23 -06:00
|
|
|
--> $DIR/projection-no-regions-closure.rs:36:23
|
|
|
|
|
|
|
|
|
36 | with_signature(x, |mut y| Box::new(y.next()))
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-12-19 10:12:56 -06:00
|
|
|
|
|
|
|
|
= help: consider adding an explicit lifetime bound `<T as std::iter::Iterator>::Item: ReEarlyBound(0, 'a)`...
|
2017-12-05 12:15:23 -06:00
|
|
|
|
|
|
|
note: No external requirements
|
|
|
|
--> $DIR/projection-no-regions-closure.rs:32:1
|
|
|
|
|
|
|
|
|
32 | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a>
|
|
|
|
33 | | where
|
|
|
|
34 | | T: Iterator,
|
|
|
|
35 | | {
|
|
|
|
... |
|
2017-12-19 10:12:56 -06:00
|
|
|
38 | | //~| ERROR the associated type `<T as std::iter::Iterator>::Item` may not live long enough
|
2017-12-05 12:15:23 -06:00
|
|
|
39 | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/0:6 ~ projection_no_regions_closure[317d]::no_region[0]) with substs [
|
|
|
|
'_#1r,
|
|
|
|
T
|
|
|
|
]
|
|
|
|
|
2018-02-22 17:46:02 -06:00
|
|
|
note: External requirements
|
|
|
|
--> $DIR/projection-no-regions-closure.rs:46:23
|
|
|
|
|
|
|
|
|
46 | with_signature(x, |mut y| Box::new(y.next()))
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/1:18 ~ projection_no_regions_closure[317d]::correct_region[0]::{{closure}}[0]) with closure substs [
|
|
|
|
'_#1r,
|
|
|
|
T,
|
|
|
|
i32,
|
|
|
|
extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<Anything + '_#2r>
|
|
|
|
]
|
|
|
|
= note: number of external vids: 3
|
|
|
|
= note: where <T as std::iter::Iterator>::Item: '_#2r
|
|
|
|
|
2017-12-05 12:15:23 -06:00
|
|
|
note: No external requirements
|
|
|
|
--> $DIR/projection-no-regions-closure.rs:42:1
|
|
|
|
|
|
|
|
|
42 | / fn correct_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a>
|
|
|
|
43 | | where
|
|
|
|
44 | | T: 'a + Iterator,
|
|
|
|
45 | | {
|
|
|
|
46 | | with_signature(x, |mut y| Box::new(y.next()))
|
|
|
|
47 | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/0:7 ~ projection_no_regions_closure[317d]::correct_region[0]) with substs [
|
|
|
|
'_#1r,
|
|
|
|
T
|
|
|
|
]
|
|
|
|
|
2018-02-22 17:46:02 -06:00
|
|
|
note: External requirements
|
|
|
|
--> $DIR/projection-no-regions-closure.rs:54:23
|
|
|
|
|
|
|
|
|
54 | with_signature(x, |mut y| Box::new(y.next()))
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/1:22 ~ projection_no_regions_closure[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [
|
|
|
|
'_#1r,
|
|
|
|
'_#2r,
|
|
|
|
T,
|
|
|
|
i32,
|
|
|
|
extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<Anything + '_#3r>
|
|
|
|
]
|
|
|
|
= note: number of external vids: 4
|
|
|
|
= note: where <T as std::iter::Iterator>::Item: '_#3r
|
|
|
|
|
2017-12-19 10:12:56 -06:00
|
|
|
error[E0309]: the associated type `<T as std::iter::Iterator>::Item` may not live long enough
|
2017-12-05 12:15:23 -06:00
|
|
|
--> $DIR/projection-no-regions-closure.rs:54:23
|
|
|
|
|
|
|
|
|
54 | with_signature(x, |mut y| Box::new(y.next()))
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-12-19 10:12:56 -06:00
|
|
|
|
|
|
|
|
= help: consider adding an explicit lifetime bound `<T as std::iter::Iterator>::Item: ReEarlyBound(0, 'a)`...
|
2017-12-05 12:15:23 -06:00
|
|
|
|
|
|
|
note: No external requirements
|
|
|
|
--> $DIR/projection-no-regions-closure.rs:50:1
|
|
|
|
|
|
|
|
|
50 | / fn wrong_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a>
|
|
|
|
51 | | where
|
|
|
|
52 | | T: 'b + Iterator,
|
|
|
|
53 | | {
|
|
|
|
... |
|
2017-12-19 10:12:56 -06:00
|
|
|
56 | | //~| ERROR the associated type `<T as std::iter::Iterator>::Item` may not live long enough
|
2017-12-05 12:15:23 -06:00
|
|
|
57 | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/0:8 ~ projection_no_regions_closure[317d]::wrong_region[0]) with substs [
|
|
|
|
'_#1r,
|
|
|
|
'_#2r,
|
|
|
|
T
|
|
|
|
]
|
|
|
|
|
2018-02-22 17:46:02 -06:00
|
|
|
note: External requirements
|
|
|
|
--> $DIR/projection-no-regions-closure.rs:65:23
|
|
|
|
|
|
|
|
|
65 | with_signature(x, |mut y| Box::new(y.next()))
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/1:26 ~ projection_no_regions_closure[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [
|
|
|
|
'_#1r,
|
|
|
|
'_#2r,
|
|
|
|
T,
|
|
|
|
i32,
|
|
|
|
extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<Anything + '_#3r>
|
|
|
|
]
|
|
|
|
= note: number of external vids: 4
|
|
|
|
= note: where <T as std::iter::Iterator>::Item: '_#3r
|
|
|
|
|
2017-12-05 12:15:23 -06:00
|
|
|
note: No external requirements
|
|
|
|
--> $DIR/projection-no-regions-closure.rs:60:1
|
|
|
|
|
|
|
|
|
60 | / fn outlives_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a>
|
|
|
|
61 | | where
|
|
|
|
62 | | T: 'b + Iterator,
|
|
|
|
63 | | 'b: 'a,
|
|
|
|
64 | | {
|
|
|
|
65 | | with_signature(x, |mut y| Box::new(y.next()))
|
|
|
|
66 | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/0:9 ~ projection_no_regions_closure[317d]::outlives_region[0]) with substs [
|
|
|
|
'_#1r,
|
|
|
|
'_#2r,
|
|
|
|
T
|
|
|
|
]
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2018-02-19 14:40:25 -06:00
|
|
|
If you want more information on this error, try using "rustc --explain E0309"
|