1 note: external requirements
2 --> $DIR/projection-no-regions-closure.rs:25:23
4 LL | with_signature(x, |mut y| Box::new(y.next()))
7 = note: defining type: no_region::<'_#1r, T>::{closure#0} with closure substs [
9 extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#2r)>,
12 = note: number of external vids: 3
13 = note: where <T as std::iter::Iterator>::Item: '_#2r
15 note: no external requirements
16 --> $DIR/projection-no-regions-closure.rs:21:1
18 LL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a>
23 = note: defining type: no_region::<'_#1r, T>
25 error[E0309]: the associated type `<T as Iterator>::Item` may not live long enough
26 --> $DIR/projection-no-regions-closure.rs:25:31
28 LL | with_signature(x, |mut y| Box::new(y.next()))
31 = help: consider adding an explicit lifetime bound `<T as Iterator>::Item: 'a`...
32 = note: ...so that the type `<T as Iterator>::Item` will meet its required lifetime bounds
34 note: external requirements
35 --> $DIR/projection-no-regions-closure.rs:34:23
37 LL | with_signature(x, |mut y| Box::new(y.next()))
40 = note: defining type: correct_region::<'_#1r, T>::{closure#0} with closure substs [
42 extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#2r)>,
45 = note: number of external vids: 3
46 = note: where <T as std::iter::Iterator>::Item: '_#2r
48 note: no external requirements
49 --> $DIR/projection-no-regions-closure.rs:30:1
51 LL | / fn correct_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a>
53 LL | | T: 'a + Iterator,
54 | |_____________________^
56 = note: defining type: correct_region::<'_#1r, T>
58 note: external requirements
59 --> $DIR/projection-no-regions-closure.rs:42:23
61 LL | with_signature(x, |mut y| Box::new(y.next()))
64 = note: defining type: wrong_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
66 extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#3r)>,
69 = note: number of external vids: 4
70 = note: where <T as std::iter::Iterator>::Item: '_#3r
72 note: no external requirements
73 --> $DIR/projection-no-regions-closure.rs:38:1
75 LL | / fn wrong_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a>
77 LL | | T: 'b + Iterator,
78 | |_____________________^
80 = note: defining type: wrong_region::<'_#1r, '_#2r, T>
82 error[E0309]: the associated type `<T as Iterator>::Item` may not live long enough
83 --> $DIR/projection-no-regions-closure.rs:42:31
85 LL | with_signature(x, |mut y| Box::new(y.next()))
88 = help: consider adding an explicit lifetime bound `<T as Iterator>::Item: 'a`...
89 = note: ...so that the type `<T as Iterator>::Item` will meet its required lifetime bounds
91 note: external requirements
92 --> $DIR/projection-no-regions-closure.rs:52:23
94 LL | with_signature(x, |mut y| Box::new(y.next()))
97 = note: defining type: outlives_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
99 extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#3r)>,
102 = note: number of external vids: 4
103 = note: where <T as std::iter::Iterator>::Item: '_#3r
105 note: no external requirements
106 --> $DIR/projection-no-regions-closure.rs:47:1
108 LL | / fn outlives_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a>
110 LL | | T: 'b + Iterator,
114 = note: defining type: outlives_region::<'_#1r, '_#2r, T>
116 error: aborting due to 2 previous errors
118 For more information about this error, try `rustc --explain E0309`.