]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/ty-outlives/projection-one-region-closure.stderr
Auto merge of #101138 - Rejyr:diagnostic-migration-rustc-lint-pt2, r=davidtwco
[rust.git] / tests / 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            ]
12    = note: late-bound region is '_#3r
13    = note: number of external vids: 4
14    = note: where T: '_#2r
15    = note: where '_#1r: '_#2r
16
17 note: no external requirements
18   --> $DIR/projection-one-region-closure.rs:41:1
19    |
20 LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
21 LL | | where
22 LL | |     T: Anything<'b>,
23    | |____________________^
24    |
25    = note: defining type: no_relationships_late::<'_#1r, T>
26
27 error[E0309]: the parameter type `T` may not live long enough
28   --> $DIR/projection-one-region-closure.rs:45:39
29    |
30 LL |     with_signature(cell, t, |cell, t| require(cell, t));
31    |                                       ^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
32    |
33 help: consider adding an explicit lifetime bound...
34    |
35 LL |     T: Anything<'b> + 'a,
36    |                     ++++
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            ]
62    = note: number of external vids: 4
63    = note: where T: '_#3r
64    = note: where '_#2r: '_#3r
65
66 note: no external requirements
67   --> $DIR/projection-one-region-closure.rs:51:1
68    |
69 LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
70 LL | | where
71 LL | |     T: Anything<'b>,
72 LL | |     'a: 'a,
73    | |___________^
74    |
75    = note: defining type: no_relationships_early::<'_#1r, '_#2r, T>
76
77 error[E0309]: the parameter type `T` may not live long enough
78   --> $DIR/projection-one-region-closure.rs:56:39
79    |
80 LL |     with_signature(cell, t, |cell, t| require(cell, t));
81    |                                       ^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
82    |
83 help: consider adding an explicit lifetime bound...
84    |
85 LL |     T: Anything<'b> + 'a,
86    |                     ++++
87
88 error: lifetime may not live long enough
89   --> $DIR/projection-one-region-closure.rs:56:39
90    |
91 LL | fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
92    |                           --  -- lifetime `'b` defined here
93    |                           |
94    |                           lifetime `'a` defined here
95 ...
96 LL |     with_signature(cell, t, |cell, t| require(cell, t));
97    |                                       ^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`
98    |
99    = help: consider adding the following bound: `'b: 'a`
100
101 note: external requirements
102   --> $DIR/projection-one-region-closure.rs:70:29
103    |
104 LL |     with_signature(cell, t, |cell, t| require(cell, t));
105    |                             ^^^^^^^^^
106    |
107    = note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
108                i32,
109                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
110                (),
111            ]
112    = note: number of external vids: 4
113    = note: where <T as Anything<ReEarlyBound(1, 'b)>>::AssocType: '_#3r
114
115 note: no external requirements
116   --> $DIR/projection-one-region-closure.rs:62:1
117    |
118 LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
119 LL | | where
120 LL | |     T: Anything<'b>,
121 LL | |     T::AssocType: 'a,
122    | |_____________________^
123    |
124    = note: defining type: projection_outlives::<'_#1r, '_#2r, T>
125
126 note: external requirements
127   --> $DIR/projection-one-region-closure.rs:80:29
128    |
129 LL |     with_signature(cell, t, |cell, t| require(cell, t));
130    |                             ^^^^^^^^^
131    |
132    = note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
133                i32,
134                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
135                (),
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 LL | |     'b: 'a,
149    | |___________^
150    |
151    = note: defining type: elements_outlive::<'_#1r, '_#2r, T>
152
153 error: aborting due to 4 previous errors
154
155 For more information about this error, try `rustc --explain E0309`.