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

127 lines
4.2 KiB
Plaintext
Raw Normal View History

2017-12-05 12:15:23 -06:00
note: External requirements
2018-12-25 09:56:47 -06:00
--> $DIR/projection-no-regions-closure.rs:25:23
2017-12-05 12:15:23 -06:00
|
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: no_region::<'_#1r, T>::{{closure}}#0 with closure substs [
2017-12-05 12:15:23 -06:00
i32,
extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#2r)>,
2017-12-05 12:15:23 -06:00
]
2018-09-06 21:57:05 -05:00
= note: number of external vids: 3
2017-12-05 12:15:23 -06:00
= note: where <T as std::iter::Iterator>::Item: '_#2r
note: No external requirements
2018-12-25 09:56:47 -06:00
--> $DIR/projection-no-regions-closure.rs:21:1
2017-12-05 12:15:23 -06:00
|
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 | | {
2018-08-31 12:27:11 -05:00
LL | | with_signature(x, |mut y| Box::new(y.next()))
2019-03-09 06:03:44 -06:00
LL | |
2018-02-22 18:42:32 -06:00
LL | | }
2017-12-05 12:15:23 -06:00
| |_^
|
= note: defining type: no_region::<'_#1r, T>
2017-12-05 12:15:23 -06:00
error[E0309]: the associated type `<T as std::iter::Iterator>::Item` may not live long enough
2018-12-25 09:56:47 -06:00
--> $DIR/projection-no-regions-closure.rs:25:23
|
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider adding an explicit lifetime bound `<T as std::iter::Iterator>::Item: ReEarlyBound(0, 'a)`...
note: External requirements
2018-12-25 09:56:47 -06:00
--> $DIR/projection-no-regions-closure.rs:34:23
|
2018-02-24 17:59:34 -06:00
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: correct_region::<'_#1r, T>::{{closure}}#0 with closure substs [
i32,
extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#2r)>,
]
2018-09-06 21:57:05 -05:00
= 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
2018-12-25 09:56:47 -06:00
--> $DIR/projection-no-regions-closure.rs:30:1
2017-12-05 12:15:23 -06:00
|
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: correct_region::<'_#1r, T>
2017-12-05 12:15:23 -06:00
note: External requirements
2018-12-25 09:56:47 -06:00
--> $DIR/projection-no-regions-closure.rs:42:23
|
2018-02-24 17:59:34 -06:00
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: wrong_region::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
i32,
extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#3r)>,
]
2018-09-06 21:57:05 -05:00
= 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
2018-12-25 09:56:47 -06:00
--> $DIR/projection-no-regions-closure.rs:38:1
2017-12-05 12:15:23 -06:00
|
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 | | {
2018-08-31 12:27:11 -05:00
LL | | with_signature(x, |mut y| Box::new(y.next()))
2019-03-09 06:03:44 -06:00
LL | |
2018-02-22 18:42:32 -06:00
LL | | }
2017-12-05 12:15:23 -06:00
| |_^
|
= note: defining type: wrong_region::<'_#1r, '_#2r, T>
2017-12-05 12:15:23 -06:00
error[E0309]: the associated type `<T as std::iter::Iterator>::Item` may not live long enough
2018-12-25 09:56:47 -06:00
--> $DIR/projection-no-regions-closure.rs:42:23
|
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider adding an explicit lifetime bound `<T as std::iter::Iterator>::Item: ReEarlyBound(0, 'a)`...
note: External requirements
2018-12-25 09:56:47 -06:00
--> $DIR/projection-no-regions-closure.rs:52:23
|
2018-02-24 17:59:34 -06:00
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: outlives_region::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
i32,
extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#3r)>,
]
2018-09-06 21:57:05 -05:00
= 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
2018-12-25 09:56:47 -06:00
--> $DIR/projection-no-regions-closure.rs:47:1
2017-12-05 12:15:23 -06:00
|
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: outlives_region::<'_#1r, '_#2r, T>
2017-12-05 12:15:23 -06:00
error: aborting due to 2 previous errors
2018-03-03 08:59:40 -06:00
For more information about this error, try `rustc --explain E0309`.