Skip to content

Commit 542ad5e

Browse files
committed
update test files to reflect new output
One surprise: old-lub-glb-object.rs, may indicate a bug
1 parent 85a24b1 commit 542ad5e

File tree

67 files changed

+826
-288
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+826
-288
lines changed

src/librustc/infer/region_constraints/leak_check.rs

+12
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ impl<'tcx> RegionConstraintCollector<'tcx> {
3131

3232
assert!(self.in_snapshot());
3333

34+
// If the user gave `-Zno-leak-check`, then skip the leak
35+
// check completely. This is wildly unsound and also not
36+
// unlikely to cause an ICE or two. It is intended for use
37+
// only during a transition period, in which the MIR typeck
38+
// uses the "universe-style" check, and the rest of typeck
39+
// uses the more conservative leak check. Since the leak
40+
// check is more conservative, we can't test the
41+
// universe-style check without disabling it.
42+
if tcx.sess.opts.debugging_opts.no_leak_check {
43+
return Ok(());
44+
}
45+
3446
// Go through each placeholder that we created.
3547
for (_, &placeholder_region) in placeholder_map {
3648
// Find the universe this placeholder inhabits.

src/test/ui/anonymous-higher-ranked-lifetime.rs

+11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
11
fn main() {
22
f1(|_: (), _: ()| {}); //~ ERROR type mismatch
3+
//~^ ERROR type mismatch
34
f2(|_: (), _: ()| {}); //~ ERROR type mismatch
5+
//~^ ERROR type mismatch
46
f3(|_: (), _: ()| {}); //~ ERROR type mismatch
7+
//~^ ERROR type mismatch
58
f4(|_: (), _: ()| {}); //~ ERROR type mismatch
9+
//~^ ERROR type mismatch
610
f5(|_: (), _: ()| {}); //~ ERROR type mismatch
11+
//~^ ERROR type mismatch
712
g1(|_: (), _: ()| {}); //~ ERROR type mismatch
13+
//~^ ERROR type mismatch
814
g2(|_: (), _: ()| {}); //~ ERROR type mismatch
15+
//~^ ERROR type mismatch
916
g3(|_: (), _: ()| {}); //~ ERROR type mismatch
17+
//~^ ERROR type mismatch
1018
g4(|_: (), _: ()| {}); //~ ERROR type mismatch
19+
//~^ ERROR type mismatch
1120
h1(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch
21+
//~^ ERROR type mismatch
1222
h2(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch
23+
//~^ ERROR type mismatch
1324
}
1425

1526
// Basic

src/test/ui/anonymous-higher-ranked-lifetime.stderr

+175-21
Original file line numberDiff line numberDiff line change
@@ -7,151 +7,305 @@ LL | f1(|_: (), _: ()| {}); //~ ERROR type mismatch
77
| expected signature of `for<'r, 's> fn(&'r (), &'s ()) -> _`
88
|
99
note: required by `f1`
10-
--> $DIR/anonymous-higher-ranked-lifetime.rs:16:1
10+
--> $DIR/anonymous-higher-ranked-lifetime.rs:27:1
1111
|
1212
LL | fn f1<F>(_: F) where F: Fn(&(), &()) {}
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1414

1515
error[E0631]: type mismatch in closure arguments
16-
--> $DIR/anonymous-higher-ranked-lifetime.rs:3:5
16+
--> $DIR/anonymous-higher-ranked-lifetime.rs:2:5
17+
|
18+
LL | f1(|_: (), _: ()| {}); //~ ERROR type mismatch
19+
| ^^ -------------- found signature of `fn((), ()) -> _`
20+
| |
21+
| expected signature of `fn(&(), &()) -> _`
22+
|
23+
note: required by `f1`
24+
--> $DIR/anonymous-higher-ranked-lifetime.rs:27:1
25+
|
26+
LL | fn f1<F>(_: F) where F: Fn(&(), &()) {}
27+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28+
29+
error[E0631]: type mismatch in closure arguments
30+
--> $DIR/anonymous-higher-ranked-lifetime.rs:4:5
1731
|
1832
LL | f2(|_: (), _: ()| {}); //~ ERROR type mismatch
1933
| ^^ -------------- found signature of `fn((), ()) -> _`
2034
| |
2135
| expected signature of `for<'a, 'r> fn(&'a (), &'r ()) -> _`
2236
|
2337
note: required by `f2`
24-
--> $DIR/anonymous-higher-ranked-lifetime.rs:17:1
38+
--> $DIR/anonymous-higher-ranked-lifetime.rs:28:1
2539
|
2640
LL | fn f2<F>(_: F) where F: for<'a> Fn(&'a (), &()) {}
2741
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2842

2943
error[E0631]: type mismatch in closure arguments
3044
--> $DIR/anonymous-higher-ranked-lifetime.rs:4:5
3145
|
46+
LL | f2(|_: (), _: ()| {}); //~ ERROR type mismatch
47+
| ^^ -------------- found signature of `fn((), ()) -> _`
48+
| |
49+
| expected signature of `fn(&'a (), &()) -> _`
50+
|
51+
note: required by `f2`
52+
--> $DIR/anonymous-higher-ranked-lifetime.rs:28:1
53+
|
54+
LL | fn f2<F>(_: F) where F: for<'a> Fn(&'a (), &()) {}
55+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56+
57+
error[E0631]: type mismatch in closure arguments
58+
--> $DIR/anonymous-higher-ranked-lifetime.rs:6:5
59+
|
3260
LL | f3(|_: (), _: ()| {}); //~ ERROR type mismatch
3361
| ^^ -------------- found signature of `fn((), ()) -> _`
3462
| |
3563
| expected signature of `for<'r> fn(&(), &'r ()) -> _`
3664
|
3765
note: required by `f3`
38-
--> $DIR/anonymous-higher-ranked-lifetime.rs:18:1
66+
--> $DIR/anonymous-higher-ranked-lifetime.rs:29:1
3967
|
4068
LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {}
4169
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4270

4371
error[E0631]: type mismatch in closure arguments
44-
--> $DIR/anonymous-higher-ranked-lifetime.rs:5:5
72+
--> $DIR/anonymous-higher-ranked-lifetime.rs:6:5
73+
|
74+
LL | f3(|_: (), _: ()| {}); //~ ERROR type mismatch
75+
| ^^ -------------- found signature of `fn((), ()) -> _`
76+
| |
77+
| expected signature of `fn(&(), &()) -> _`
78+
|
79+
note: required by `f3`
80+
--> $DIR/anonymous-higher-ranked-lifetime.rs:29:1
81+
|
82+
LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {}
83+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84+
85+
error[E0631]: type mismatch in closure arguments
86+
--> $DIR/anonymous-higher-ranked-lifetime.rs:8:5
4587
|
4688
LL | f4(|_: (), _: ()| {}); //~ ERROR type mismatch
4789
| ^^ -------------- found signature of `fn((), ()) -> _`
4890
| |
4991
| expected signature of `for<'s, 'r> fn(&'s (), &'r ()) -> _`
5092
|
5193
note: required by `f4`
52-
--> $DIR/anonymous-higher-ranked-lifetime.rs:19:1
94+
--> $DIR/anonymous-higher-ranked-lifetime.rs:30:1
5395
|
5496
LL | fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {}
5597
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5698

5799
error[E0631]: type mismatch in closure arguments
58-
--> $DIR/anonymous-higher-ranked-lifetime.rs:6:5
100+
--> $DIR/anonymous-higher-ranked-lifetime.rs:8:5
101+
|
102+
LL | f4(|_: (), _: ()| {}); //~ ERROR type mismatch
103+
| ^^ -------------- found signature of `fn((), ()) -> _`
104+
| |
105+
| expected signature of `fn(&(), &'r ()) -> _`
106+
|
107+
note: required by `f4`
108+
--> $DIR/anonymous-higher-ranked-lifetime.rs:30:1
109+
|
110+
LL | fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {}
111+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112+
113+
error[E0631]: type mismatch in closure arguments
114+
--> $DIR/anonymous-higher-ranked-lifetime.rs:10:5
59115
|
60116
LL | f5(|_: (), _: ()| {}); //~ ERROR type mismatch
61117
| ^^ -------------- found signature of `fn((), ()) -> _`
62118
| |
63119
| expected signature of `for<'r> fn(&'r (), &'r ()) -> _`
64120
|
65121
note: required by `f5`
66-
--> $DIR/anonymous-higher-ranked-lifetime.rs:20:1
122+
--> $DIR/anonymous-higher-ranked-lifetime.rs:31:1
67123
|
68124
LL | fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {}
69125
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
70126

71127
error[E0631]: type mismatch in closure arguments
72-
--> $DIR/anonymous-higher-ranked-lifetime.rs:7:5
128+
--> $DIR/anonymous-higher-ranked-lifetime.rs:10:5
129+
|
130+
LL | f5(|_: (), _: ()| {}); //~ ERROR type mismatch
131+
| ^^ -------------- found signature of `fn((), ()) -> _`
132+
| |
133+
| expected signature of `fn(&'r (), &'r ()) -> _`
134+
|
135+
note: required by `f5`
136+
--> $DIR/anonymous-higher-ranked-lifetime.rs:31:1
137+
|
138+
LL | fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {}
139+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140+
141+
error[E0631]: type mismatch in closure arguments
142+
--> $DIR/anonymous-higher-ranked-lifetime.rs:12:5
73143
|
74144
LL | g1(|_: (), _: ()| {}); //~ ERROR type mismatch
75145
| ^^ -------------- found signature of `fn((), ()) -> _`
76146
| |
77147
| expected signature of `for<'r> fn(&'r (), std::boxed::Box<(dyn for<'s> std::ops::Fn(&'s ()) + 'static)>) -> _`
78148
|
79149
note: required by `g1`
80-
--> $DIR/anonymous-higher-ranked-lifetime.rs:23:1
150+
--> $DIR/anonymous-higher-ranked-lifetime.rs:34:1
81151
|
82152
LL | fn g1<F>(_: F) where F: Fn(&(), Box<Fn(&())>) {}
83153
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84154

85155
error[E0631]: type mismatch in closure arguments
86-
--> $DIR/anonymous-higher-ranked-lifetime.rs:8:5
156+
--> $DIR/anonymous-higher-ranked-lifetime.rs:12:5
157+
|
158+
LL | g1(|_: (), _: ()| {}); //~ ERROR type mismatch
159+
| ^^ -------------- found signature of `fn((), ()) -> _`
160+
| |
161+
| expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _`
162+
|
163+
note: required by `g1`
164+
--> $DIR/anonymous-higher-ranked-lifetime.rs:34:1
165+
|
166+
LL | fn g1<F>(_: F) where F: Fn(&(), Box<Fn(&())>) {}
167+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
168+
169+
error[E0631]: type mismatch in closure arguments
170+
--> $DIR/anonymous-higher-ranked-lifetime.rs:14:5
87171
|
88172
LL | g2(|_: (), _: ()| {}); //~ ERROR type mismatch
89173
| ^^ -------------- found signature of `fn((), ()) -> _`
90174
| |
91175
| expected signature of `for<'r> fn(&'r (), for<'s> fn(&'s ())) -> _`
92176
|
93177
note: required by `g2`
94-
--> $DIR/anonymous-higher-ranked-lifetime.rs:24:1
178+
--> $DIR/anonymous-higher-ranked-lifetime.rs:35:1
95179
|
96180
LL | fn g2<F>(_: F) where F: Fn(&(), fn(&())) {}
97181
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
98182

99183
error[E0631]: type mismatch in closure arguments
100-
--> $DIR/anonymous-higher-ranked-lifetime.rs:9:5
184+
--> $DIR/anonymous-higher-ranked-lifetime.rs:14:5
185+
|
186+
LL | g2(|_: (), _: ()| {}); //~ ERROR type mismatch
187+
| ^^ -------------- found signature of `fn((), ()) -> _`
188+
| |
189+
| expected signature of `fn(&(), for<'r> fn(&'r ())) -> _`
190+
|
191+
note: required by `g2`
192+
--> $DIR/anonymous-higher-ranked-lifetime.rs:35:1
193+
|
194+
LL | fn g2<F>(_: F) where F: Fn(&(), fn(&())) {}
195+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
196+
197+
error[E0631]: type mismatch in closure arguments
198+
--> $DIR/anonymous-higher-ranked-lifetime.rs:16:5
101199
|
102200
LL | g3(|_: (), _: ()| {}); //~ ERROR type mismatch
103201
| ^^ -------------- found signature of `fn((), ()) -> _`
104202
| |
105203
| expected signature of `for<'s> fn(&'s (), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _`
106204
|
107205
note: required by `g3`
108-
--> $DIR/anonymous-higher-ranked-lifetime.rs:25:1
206+
--> $DIR/anonymous-higher-ranked-lifetime.rs:36:1
109207
|
110208
LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<Fn(&())>) {}
111209
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112210

113211
error[E0631]: type mismatch in closure arguments
114-
--> $DIR/anonymous-higher-ranked-lifetime.rs:10:5
212+
--> $DIR/anonymous-higher-ranked-lifetime.rs:16:5
213+
|
214+
LL | g3(|_: (), _: ()| {}); //~ ERROR type mismatch
215+
| ^^ -------------- found signature of `fn((), ()) -> _`
216+
| |
217+
| expected signature of `fn(&'s (), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _`
218+
|
219+
note: required by `g3`
220+
--> $DIR/anonymous-higher-ranked-lifetime.rs:36:1
221+
|
222+
LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<Fn(&())>) {}
223+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
224+
225+
error[E0631]: type mismatch in closure arguments
226+
--> $DIR/anonymous-higher-ranked-lifetime.rs:18:5
115227
|
116228
LL | g4(|_: (), _: ()| {}); //~ ERROR type mismatch
117229
| ^^ -------------- found signature of `fn((), ()) -> _`
118230
| |
119231
| expected signature of `for<'s> fn(&'s (), for<'r> fn(&'r ())) -> _`
120232
|
121233
note: required by `g4`
122-
--> $DIR/anonymous-higher-ranked-lifetime.rs:26:1
234+
--> $DIR/anonymous-higher-ranked-lifetime.rs:37:1
235+
|
236+
LL | fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {}
237+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
238+
239+
error[E0631]: type mismatch in closure arguments
240+
--> $DIR/anonymous-higher-ranked-lifetime.rs:18:5
241+
|
242+
LL | g4(|_: (), _: ()| {}); //~ ERROR type mismatch
243+
| ^^ -------------- found signature of `fn((), ()) -> _`
244+
| |
245+
| expected signature of `fn(&(), for<'r> fn(&'r ())) -> _`
246+
|
247+
note: required by `g4`
248+
--> $DIR/anonymous-higher-ranked-lifetime.rs:37:1
123249
|
124250
LL | fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {}
125251
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
126252

127253
error[E0631]: type mismatch in closure arguments
128-
--> $DIR/anonymous-higher-ranked-lifetime.rs:11:5
254+
--> $DIR/anonymous-higher-ranked-lifetime.rs:20:5
129255
|
130256
LL | h1(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch
131257
| ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _`
132258
| |
133259
| expected signature of `for<'r, 's> fn(&'r (), std::boxed::Box<(dyn for<'t0> std::ops::Fn(&'t0 ()) + 'static)>, &'s (), for<'t0, 't1> fn(&'t0 (), &'t1 ())) -> _`
134260
|
135261
note: required by `h1`
136-
--> $DIR/anonymous-higher-ranked-lifetime.rs:29:1
262+
--> $DIR/anonymous-higher-ranked-lifetime.rs:40:1
137263
|
138264
LL | fn h1<F>(_: F) where F: Fn(&(), Box<Fn(&())>, &(), fn(&(), &())) {}
139265
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140266

141267
error[E0631]: type mismatch in closure arguments
142-
--> $DIR/anonymous-higher-ranked-lifetime.rs:12:5
268+
--> $DIR/anonymous-higher-ranked-lifetime.rs:20:5
269+
|
270+
LL | h1(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch
271+
| ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _`
272+
| |
273+
| expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>, &(), for<'r, 's> fn(&'r (), &'s ())) -> _`
274+
|
275+
note: required by `h1`
276+
--> $DIR/anonymous-higher-ranked-lifetime.rs:40:1
277+
|
278+
LL | fn h1<F>(_: F) where F: Fn(&(), Box<Fn(&())>, &(), fn(&(), &())) {}
279+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
280+
281+
error[E0631]: type mismatch in closure arguments
282+
--> $DIR/anonymous-higher-ranked-lifetime.rs:22:5
143283
|
144284
LL | h2(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch
145285
| ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _`
146286
| |
147287
| expected signature of `for<'r, 't0> fn(&'r (), std::boxed::Box<(dyn for<'s> std::ops::Fn(&'s ()) + 'static)>, &'t0 (), for<'s, 't1> fn(&'s (), &'t1 ())) -> _`
148288
|
149289
note: required by `h2`
150-
--> $DIR/anonymous-higher-ranked-lifetime.rs:30:1
290+
--> $DIR/anonymous-higher-ranked-lifetime.rs:41:1
291+
|
292+
LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<Fn(&())>, &'t0 (), fn(&(), &())) {}
293+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
294+
295+
error[E0631]: type mismatch in closure arguments
296+
--> $DIR/anonymous-higher-ranked-lifetime.rs:22:5
297+
|
298+
LL | h2(|_: (), _: (), _: (), _: ()| {}); //~ ERROR type mismatch
299+
| ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _`
300+
| |
301+
| expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>, &'t0 (), for<'r, 's> fn(&'r (), &'s ())) -> _`
302+
|
303+
note: required by `h2`
304+
--> $DIR/anonymous-higher-ranked-lifetime.rs:41:1
151305
|
152306
LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<Fn(&())>, &'t0 (), fn(&(), &())) {}
153307
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
154308

155-
error: aborting due to 11 previous errors
309+
error: aborting due to 22 previous errors
156310

157311
For more information about this error, try `rustc --explain E0631`.

src/test/ui/associated-types/associated-types-eq-hr.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,14 @@ pub fn call_bar() {
8989

9090
pub fn call_tuple_one() {
9191
tuple_one::<Tuple>();
92-
//~^ ERROR not general enough
92+
//~^ ERROR not satisfied
93+
//~| ERROR type mismatch
9394
}
9495

9596
pub fn call_tuple_two() {
9697
tuple_two::<Tuple>();
97-
//~^ ERROR not general enough
98+
//~^ ERROR not satisfied
99+
//~| ERROR type mismatch
98100
}
99101

100102
pub fn call_tuple_three() {
@@ -103,7 +105,7 @@ pub fn call_tuple_three() {
103105

104106
pub fn call_tuple_four() {
105107
tuple_four::<Tuple>();
106-
//~^ ERROR not general enough
108+
//~^ ERROR not satisfied
107109
}
108110

109111
fn main() { }

0 commit comments

Comments
 (0)