fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1note: external requirements 2 --> $DIR/projection-no-regions-closure.rs:25:23 3 | 4LL | with_signature(x, |mut y| Box::new(y.next())) 5 | ^^^^^^^ 6 | 7 = note: defining type: no_region::<'?1, T>::{closure#0} with closure args [ 8 i32, 9 extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '?2)>, 10 (), 11 ] 12 = note: number of external vids: 3 13 = note: where <T as std::iter::Iterator>::Item: '?2 14 15note: no external requirements 16 --> $DIR/projection-no-regions-closure.rs:21:1 17 | 18LL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a> 19LL | | where 20LL | | T: Iterator, 21 | |________________^ 22 | 23 = note: defining type: no_region::<'?1, T> 24 25error[E0309]: the associated type `<T as Iterator>::Item` may not live long enough 26 --> $DIR/projection-no-regions-closure.rs:25:31 27 | 28LL | with_signature(x, |mut y| Box::new(y.next())) 29 | ^^^^^^^^^^^^^^^^^^ 30 | 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 33 34note: external requirements 35 --> $DIR/projection-no-regions-closure.rs:34:23 36 | 37LL | with_signature(x, |mut y| Box::new(y.next())) 38 | ^^^^^^^ 39 | 40 = note: defining type: correct_region::<'?1, T>::{closure#0} with closure args [ 41 i32, 42 extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '?2)>, 43 (), 44 ] 45 = note: number of external vids: 3 46 = note: where <T as std::iter::Iterator>::Item: '?2 47 48note: no external requirements 49 --> $DIR/projection-no-regions-closure.rs:30:1 50 | 51LL | / fn correct_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a> 52LL | | where 53LL | | T: 'a + Iterator, 54 | |_____________________^ 55 | 56 = note: defining type: correct_region::<'?1, T> 57 58note: external requirements 59 --> $DIR/projection-no-regions-closure.rs:42:23 60 | 61LL | with_signature(x, |mut y| Box::new(y.next())) 62 | ^^^^^^^ 63 | 64 = note: defining type: wrong_region::<'?1, '?2, T>::{closure#0} with closure args [ 65 i32, 66 extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '?3)>, 67 (), 68 ] 69 = note: number of external vids: 4 70 = note: where <T as std::iter::Iterator>::Item: '?3 71 72note: no external requirements 73 --> $DIR/projection-no-regions-closure.rs:38:1 74 | 75LL | / fn wrong_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a> 76LL | | where 77LL | | T: 'b + Iterator, 78 | |_____________________^ 79 | 80 = note: defining type: wrong_region::<'?1, '?2, T> 81 82error[E0309]: the associated type `<T as Iterator>::Item` may not live long enough 83 --> $DIR/projection-no-regions-closure.rs:42:31 84 | 85LL | with_signature(x, |mut y| Box::new(y.next())) 86 | ^^^^^^^^^^^^^^^^^^ 87 | 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 90 91note: external requirements 92 --> $DIR/projection-no-regions-closure.rs:52:23 93 | 94LL | with_signature(x, |mut y| Box::new(y.next())) 95 | ^^^^^^^ 96 | 97 = note: defining type: outlives_region::<'?1, '?2, T>::{closure#0} with closure args [ 98 i32, 99 extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '?3)>, 100 (), 101 ] 102 = note: number of external vids: 4 103 = note: where <T as std::iter::Iterator>::Item: '?3 104 105note: no external requirements 106 --> $DIR/projection-no-regions-closure.rs:47:1 107 | 108LL | / fn outlives_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a> 109LL | | where 110LL | | T: 'b + Iterator, 111LL | | 'b: 'a, 112 | |___________^ 113 | 114 = note: defining type: outlives_region::<'?1, '?2, T> 115 116error: aborting due to 2 previous errors 117 118For more information about this error, try `rustc --explain E0309`.