rust/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr

163 lines
5.5 KiB
Plaintext
Raw Normal View History

2017-12-05 12:15:23 -06:00
warning: not reporting region error due to -Znll
--> $DIR/projection-no-regions-closure.rs:36:31
|
2018-02-22 18:42:32 -06:00
LL | with_signature(x, |mut y| Box::new(y.next()))
2017-12-05 12:15:23 -06:00
| ^^^^^^^^^^^^^^^^^^
warning: not reporting region error due to -Znll
--> $DIR/projection-no-regions-closure.rs:54:31
|
2018-02-22 18:42:32 -06:00
LL | with_signature(x, |mut y| Box::new(y.next()))
2017-12-05 12:15:23 -06:00
| ^^^^^^^^^^^^^^^^^^
note: External requirements
--> $DIR/projection-no-regions-closure.rs:36:23
|
2018-02-22 18:42:32 -06:00
LL | with_signature(x, |mut y| Box::new(y.next()))
2017-12-05 12:15:23 -06:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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
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
|
2018-02-22 18:42:32 -06:00
LL | with_signature(x, |mut y| Box::new(y.next()))
2017-12-05 12:15:23 -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
|
2018-02-22 18:42:32 -06:00
LL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a>
LL | | where
LL | | T: Iterator,
LL | | {
2017-12-05 12:15:23 -06:00
... |
2018-02-22 18:42:32 -06:00
LL | | //~| ERROR the associated type `<T as std::iter::Iterator>::Item` may not live long enough
LL | | }
2017-12-05 12:15:23 -06:00
| |_^
|
= note: defining type: DefId(0/0:6 ~ projection_no_regions_closure[317d]::no_region[0]) with substs [
'_#1r,
T
]
note: External requirements
--> $DIR/projection-no-regions-closure.rs:46:23
|
2018-02-24 17:59:34 -06:00
LL | 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
|
2018-02-22 18:42:32 -06:00
LL | / fn correct_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a>
LL | | where
LL | | T: 'a + Iterator,
LL | | {
2018-02-24 17:01:39 -06:00
LL | | with_signature(x, |mut y| Box::new(y.next()))
2018-02-22 18:42:32 -06:00
LL | | }
2017-12-05 12:15:23 -06:00
| |_^
|
= note: defining type: DefId(0/0:7 ~ projection_no_regions_closure[317d]::correct_region[0]) with substs [
'_#1r,
T
]
note: External requirements
--> $DIR/projection-no-regions-closure.rs:54:23
|
2018-02-24 17:59:34 -06:00
LL | 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
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
|
2018-02-22 18:42:32 -06:00
LL | with_signature(x, |mut y| Box::new(y.next()))
2017-12-05 12:15:23 -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
|
2018-02-22 18:42:32 -06:00
LL | / fn wrong_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a>
LL | | where
LL | | T: 'b + Iterator,
LL | | {
2017-12-05 12:15:23 -06:00
... |
2018-02-22 18:42:32 -06:00
LL | | //~| ERROR the associated type `<T as std::iter::Iterator>::Item` may not live long enough
LL | | }
2017-12-05 12:15:23 -06:00
| |_^
|
= note: defining type: DefId(0/0:8 ~ projection_no_regions_closure[317d]::wrong_region[0]) with substs [
'_#1r,
'_#2r,
T
]
note: External requirements
--> $DIR/projection-no-regions-closure.rs:65:23
|
2018-02-24 17:59:34 -06:00
LL | 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
|
2018-02-22 18:42:32 -06:00
LL | / fn outlives_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a>
LL | | where
LL | | T: 'b + Iterator,
LL | | 'b: 'a,
2018-02-24 17:01:39 -06:00
LL | | {
2018-02-22 18:42:32 -06:00
LL | | with_signature(x, |mut y| Box::new(y.next()))
LL | | }
2017-12-05 12:15:23 -06:00
| |_^
|
= 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"