]> git.proxmox.com Git - rustc.git/blob - src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr
New upstream version 1.26.0+dfsg1
[rustc.git] / src / test / ui / nll / ty-outlives / ty-param-closure-outlives-from-where-clause.stderr
1 warning: not reporting region error due to -Znll
2 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:45:9
3 |
4 LL | require(&x, &y)
5 | ^^^^^^^
6
7 warning: not reporting region error due to -Znll
8 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:79:9
9 |
10 LL | require(&x, &y)
11 | ^^^^^^^
12
13 note: External requirements
14 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:38:26
15 |
16 LL | with_signature(a, b, |x, y| {
17 | __________________________^
18 LL | | //~^ ERROR the parameter type `T` may not live long enough
19 LL | | //
20 LL | | // See `correct_region`, which explains the point of this
21 ... |
22 LL | | //~^ WARNING not reporting region error due to -Znll
23 LL | | })
24 | |_____^
25 |
26 = note: defining type: DefId(0/1:16 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]::{{closure}}[0]) with closure substs [
27 T,
28 i32,
29 extern "rust-call" fn((std::cell::Cell<&'_#1r ()>, T))
30 ]
31 = note: number of external vids: 2
32 = note: where T: '_#1r
33
34 error[E0309]: the parameter type `T` may not live long enough
35 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:38:26
36 |
37 LL | with_signature(a, b, |x, y| {
38 | __________________________^
39 LL | | //~^ ERROR the parameter type `T` may not live long enough
40 LL | | //
41 LL | | // See `correct_region`, which explains the point of this
42 ... |
43 LL | | //~^ WARNING not reporting region error due to -Znll
44 LL | | })
45 | |_____^
46 |
47 = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:6 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]), BrNamed(crate0:DefIndex(1:14), 'a))`...
48
49 note: No external requirements
50 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:37:1
51 |
52 LL | / fn no_region<'a, T>(a: Cell<&'a ()>, b: T) {
53 LL | | with_signature(a, b, |x, y| {
54 LL | | //~^ ERROR the parameter type `T` may not live long enough
55 LL | | //
56 ... |
57 LL | | })
58 LL | | }
59 | |_^
60 |
61 = note: defining type: DefId(0/0:6 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]) with substs [
62 T
63 ]
64
65 note: External requirements
66 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:55:26
67 |
68 LL | with_signature(a, b, |x, y| {
69 | __________________________^
70 LL | | // Key point of this test:
71 LL | | //
72 LL | | // The *closure* is being type-checked with all of its free
73 ... |
74 LL | | require(&x, &y)
75 LL | | })
76 | |_____^
77 |
78 = note: defining type: DefId(0/1:19 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]::{{closure}}[0]) with closure substs [
79 '_#1r,
80 T,
81 i32,
82 extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
83 ]
84 = note: number of external vids: 3
85 = note: where T: '_#2r
86
87 note: No external requirements
88 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:51:1
89 |
90 LL | / fn correct_region<'a, T>(a: Cell<&'a ()>, b: T)
91 LL | | where
92 LL | | T: 'a,
93 LL | | {
94 ... |
95 LL | | })
96 LL | | }
97 | |_^
98 |
99 = note: defining type: DefId(0/0:7 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]) with substs [
100 '_#1r,
101 T
102 ]
103
104 note: External requirements
105 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:76:26
106 |
107 LL | with_signature(a, b, |x, y| {
108 | __________________________^
109 LL | | //~^ ERROR the parameter type `T` may not live long enough
110 LL | | // See `correct_region`
111 LL | | require(&x, &y)
112 LL | | //~^ WARNING not reporting region error due to -Znll
113 LL | | })
114 | |_____^
115 |
116 = note: defining type: DefId(0/1:23 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [
117 '_#1r,
118 T,
119 i32,
120 extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
121 ]
122 = note: number of external vids: 3
123 = note: where T: '_#2r
124
125 error[E0309]: the parameter type `T` may not live long enough
126 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:76:26
127 |
128 LL | with_signature(a, b, |x, y| {
129 | __________________________^
130 LL | | //~^ ERROR the parameter type `T` may not live long enough
131 LL | | // See `correct_region`
132 LL | | require(&x, &y)
133 LL | | //~^ WARNING not reporting region error due to -Znll
134 LL | | })
135 | |_____^
136 |
137 = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]), BrNamed(crate0:DefIndex(1:20), 'a))`...
138
139 note: No external requirements
140 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:72:1
141 |
142 LL | / fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
143 LL | | where
144 LL | | T: 'b,
145 LL | | {
146 ... |
147 LL | | })
148 LL | | }
149 | |_^
150 |
151 = note: defining type: DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]) with substs [
152 '_#1r,
153 T
154 ]
155
156 note: External requirements
157 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:90:26
158 |
159 LL | with_signature(a, b, |x, y| {
160 | __________________________^
161 LL | | // See `correct_region`
162 LL | | require(&x, &y)
163 LL | | })
164 | |_____^
165 |
166 = note: defining type: DefId(0/1:27 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [
167 '_#1r,
168 '_#2r,
169 T,
170 i32,
171 extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
172 ]
173 = note: number of external vids: 4
174 = note: where T: '_#3r
175
176 note: No external requirements
177 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:85:1
178 |
179 LL | / fn outlives_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
180 LL | | where
181 LL | | T: 'b,
182 LL | | 'b: 'a,
183 ... |
184 LL | | })
185 LL | | }
186 | |_^
187 |
188 = note: defining type: DefId(0/0:9 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]) with substs [
189 '_#1r,
190 '_#2r,
191 T
192 ]
193
194 error: aborting due to 2 previous errors
195
196 For more information about this error, try `rustc --explain E0309`.