]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr
rustc_mir: use nicer path printing for #[rustc_regions] NLL tests.
[rust.git] / src / test / ui / nll / ty-outlives / projection-one-region-closure.stderr
1 note: External requirements
2   --> $DIR/projection-one-region-closure.rs:45:29
3    |
4 LL |     with_signature(cell, t, |cell, t| require(cell, t));
5    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: defining type: no_relationships_late::<'_#1r, T>::{{closure}}#0 with closure substs [
8                i32,
9                extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
10            ]
11    = note: late-bound region is '_#3r
12    = note: number of external vids: 4
13    = note: where T: '_#2r
14    = note: where '_#1r: '_#2r
15
16 note: No external requirements
17   --> $DIR/projection-one-region-closure.rs:41:1
18    |
19 LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
20 LL | | where
21 LL | |     T: Anything<'b>,
22 LL | | {
23 ...  |
24 LL | |
25 LL | | }
26    | |_^
27    |
28    = note: defining type: no_relationships_late::<'_#1r, T>
29
30 error[E0309]: the parameter type `T` may not live long enough
31   --> $DIR/projection-one-region-closure.rs:45:29
32    |
33 LL |     with_signature(cell, t, |cell, t| require(cell, t));
34    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
35    |
36    = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0:15 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(16), 'a))`...
37
38 error: lifetime may not live long enough
39   --> $DIR/projection-one-region-closure.rs:45:39
40    |
41 LL | fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
42    |                          --  -- lifetime `'b` defined here
43    |                          |
44    |                          lifetime `'a` defined here
45 ...
46 LL |     with_signature(cell, t, |cell, t| require(cell, t));
47    |                                       ^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`
48    |
49    = help: consider adding the following bound: `'b: 'a`
50
51 note: External requirements
52   --> $DIR/projection-one-region-closure.rs:56:29
53    |
54 LL |     with_signature(cell, t, |cell, t| require(cell, t));
55    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
56    |
57    = note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
58                i32,
59                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
60            ]
61    = note: number of external vids: 4
62    = note: where T: '_#3r
63    = note: where '_#2r: '_#3r
64
65 note: No external requirements
66   --> $DIR/projection-one-region-closure.rs:51:1
67    |
68 LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
69 LL | | where
70 LL | |     T: Anything<'b>,
71 LL | |     'a: 'a,
72 ...  |
73 LL | |
74 LL | | }
75    | |_^
76    |
77    = note: defining type: no_relationships_early::<'_#1r, '_#2r, T>
78
79 error[E0309]: the parameter type `T` may not live long enough
80   --> $DIR/projection-one-region-closure.rs:56:29
81    |
82 LL |     with_signature(cell, t, |cell, t| require(cell, t));
83    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
84    |
85    = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
86
87 error: lifetime may not live long enough
88   --> $DIR/projection-one-region-closure.rs:56:39
89    |
90 LL | fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
91    |                           --  -- lifetime `'b` defined here
92    |                           |
93    |                           lifetime `'a` defined here
94 ...
95 LL |     with_signature(cell, t, |cell, t| require(cell, t));
96    |                                       ^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`
97    |
98    = help: consider adding the following bound: `'b: 'a`
99
100 note: External requirements
101   --> $DIR/projection-one-region-closure.rs:70:29
102    |
103 LL |     with_signature(cell, t, |cell, t| require(cell, t));
104    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
105    |
106    = note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
107                i32,
108                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
109            ]
110    = note: number of external vids: 4
111    = note: where <T as Anything<ReClosureBound('_#2r)>>::AssocType: '_#3r
112
113 note: No external requirements
114   --> $DIR/projection-one-region-closure.rs:62:1
115    |
116 LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
117 LL | | where
118 LL | |     T: Anything<'b>,
119 LL | |     T::AssocType: 'a,
120 ...  |
121 LL | |     with_signature(cell, t, |cell, t| require(cell, t));
122 LL | | }
123    | |_^
124    |
125    = note: defining type: projection_outlives::<'_#1r, '_#2r, T>
126
127 note: External requirements
128   --> $DIR/projection-one-region-closure.rs:80:29
129    |
130 LL |     with_signature(cell, t, |cell, t| require(cell, t));
131    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
132    |
133    = note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
134                i32,
135                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
136            ]
137    = note: number of external vids: 4
138    = note: where T: '_#3r
139    = note: where '_#2r: '_#3r
140
141 note: No external requirements
142   --> $DIR/projection-one-region-closure.rs:74:1
143    |
144 LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
145 LL | | where
146 LL | |     T: Anything<'b>,
147 LL | |     T: 'a,
148 ...  |
149 LL | |     with_signature(cell, t, |cell, t| require(cell, t));
150 LL | | }
151    | |_^
152    |
153    = note: defining type: elements_outlive::<'_#1r, '_#2r, T>
154
155 error: aborting due to 4 previous errors
156
157 For more information about this error, try `rustc --explain E0309`.