fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
4.3 KiB130 linesraw
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::<'_#1r, T>::{{closure}}#0 with closure substs [
8               i32,
9               extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#2r)>,
10               (),
11           ]
12   = note: number of external vids: 3
13   = note: where <T as std::iter::Iterator>::Item: '_#2r
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,
21LL | | {
22LL | |     with_signature(x, |mut y| Box::new(y.next()))
23LL | |
24LL | | }
25   | |_^
26   |
27   = note: defining type: no_region::<'_#1r, T>
28
29error[E0309]: the associated type `<T as std::iter::Iterator>::Item` may not live long enough
30  --> $DIR/projection-no-regions-closure.rs:25:23
31   |
32LL |     with_signature(x, |mut y| Box::new(y.next()))
33   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
34   |
35   = help: consider adding an explicit lifetime bound `<T as std::iter::Iterator>::Item: 'a`...
36
37note: external requirements
38  --> $DIR/projection-no-regions-closure.rs:34:23
39   |
40LL |     with_signature(x, |mut y| Box::new(y.next()))
41   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
42   |
43   = note: defining type: correct_region::<'_#1r, T>::{{closure}}#0 with closure substs [
44               i32,
45               extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#2r)>,
46               (),
47           ]
48   = note: number of external vids: 3
49   = note: where <T as std::iter::Iterator>::Item: '_#2r
50
51note: no external requirements
52  --> $DIR/projection-no-regions-closure.rs:30:1
53   |
54LL | / fn correct_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a>
55LL | | where
56LL | |     T: 'a + Iterator,
57LL | | {
58LL | |     with_signature(x, |mut y| Box::new(y.next()))
59LL | | }
60   | |_^
61   |
62   = note: defining type: correct_region::<'_#1r, T>
63
64note: external requirements
65  --> $DIR/projection-no-regions-closure.rs:42:23
66   |
67LL |     with_signature(x, |mut y| Box::new(y.next()))
68   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
69   |
70   = note: defining type: wrong_region::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
71               i32,
72               extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#3r)>,
73               (),
74           ]
75   = note: number of external vids: 4
76   = note: where <T as std::iter::Iterator>::Item: '_#3r
77
78note: no external requirements
79  --> $DIR/projection-no-regions-closure.rs:38:1
80   |
81LL | / fn wrong_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a>
82LL | | where
83LL | |     T: 'b + Iterator,
84LL | | {
85LL | |     with_signature(x, |mut y| Box::new(y.next()))
86LL | |
87LL | | }
88   | |_^
89   |
90   = note: defining type: wrong_region::<'_#1r, '_#2r, T>
91
92error[E0309]: the associated type `<T as std::iter::Iterator>::Item` may not live long enough
93  --> $DIR/projection-no-regions-closure.rs:42:23
94   |
95LL |     with_signature(x, |mut y| Box::new(y.next()))
96   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
97   |
98   = help: consider adding an explicit lifetime bound `<T as std::iter::Iterator>::Item: 'a`...
99
100note: external requirements
101  --> $DIR/projection-no-regions-closure.rs:52:23
102   |
103LL |     with_signature(x, |mut y| Box::new(y.next()))
104   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
105   |
106   = note: defining type: outlives_region::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
107               i32,
108               extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#3r)>,
109               (),
110           ]
111   = note: number of external vids: 4
112   = note: where <T as std::iter::Iterator>::Item: '_#3r
113
114note: no external requirements
115  --> $DIR/projection-no-regions-closure.rs:47:1
116   |
117LL | / fn outlives_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a>
118LL | | where
119LL | |     T: 'b + Iterator,
120LL | |     'b: 'a,
121LL | | {
122LL | |     with_signature(x, |mut y| Box::new(y.next()))
123LL | | }
124   | |_^
125   |
126   = note: defining type: outlives_region::<'_#1r, '_#2r, T>
127
128error: aborting due to 2 previous errors
129
130For more information about this error, try `rustc --explain E0309`.