fork/rust

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

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

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