Skip to content

Commit 7637008

Browse files
committed
update nll tests
1 parent 1fcbf0c commit 7637008

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
error[E0308]: mismatched types
2+
--> $DIR/placeholder-pattern-fail.rs:9:12
3+
|
4+
LL | let _: for<'a, 'b> fn(Inv<'a>, Inv<'b>) = sub;
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
6+
|
7+
= note: expected fn pointer `for<'a, 'b> fn(Inv<'a>, Inv<'b>)`
8+
found fn pointer `for<'a> fn(Inv<'a>, Inv<'a>)`
9+
10+
error[E0308]: mismatched types
11+
--> $DIR/placeholder-pattern-fail.rs:9:12
12+
|
13+
LL | let _: for<'a, 'b> fn(Inv<'a>, Inv<'b>) = sub;
14+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
15+
|
16+
= note: expected fn pointer `for<'a, 'b> fn(Inv<'a>, Inv<'b>)`
17+
found fn pointer `for<'a> fn(Inv<'a>, Inv<'a>)`
18+
19+
error: lifetime may not live long enough
20+
--> $DIR/placeholder-pattern-fail.rs:14:13
21+
|
22+
LL | fn simple1<'c>(x: (&'c i32,)) {
23+
| -- lifetime `'c` defined here
24+
LL | let _x: (&'static i32,) = x;
25+
| ^^^^^^^^^^^^^^^ type annotation requires that `'c` must outlive `'static`
26+
27+
error: lifetime may not live long enough
28+
--> $DIR/placeholder-pattern-fail.rs:19:12
29+
|
30+
LL | fn simple2<'c>(x: (&'c i32,)) {
31+
| -- lifetime `'c` defined here
32+
LL | let _: (&'static i32,) = x;
33+
| ^^^^^^^^^^^^^^^ type annotation requires that `'c` must outlive `'static`
34+
35+
error: aborting due to 4 previous errors
36+
37+
For more information about this error, try `rustc --explain E0308`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error: higher-ranked lifetime error
2+
--> $DIR/re-empty-in-error.rs:8:5
3+
|
4+
LL | foo(&10);
5+
| ^^^^^^^^
6+
|
7+
= note: could not prove for<'b, 'r> &'b (): 'r
8+
9+
error: aborting due to previous error
10+

0 commit comments

Comments
 (0)