-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
src/test/ui/hr-subtype/placeholder-pattern-fail.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/placeholder-pattern-fail.rs:9:12 | ||
| | ||
LL | let _: for<'a, 'b> fn(Inv<'a>, Inv<'b>) = sub; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other | ||
| | ||
= note: expected fn pointer `for<'a, 'b> fn(Inv<'a>, Inv<'b>)` | ||
found fn pointer `for<'a> fn(Inv<'a>, Inv<'a>)` | ||
|
||
error[E0308]: mismatched types | ||
--> $DIR/placeholder-pattern-fail.rs:9:12 | ||
| | ||
LL | let _: for<'a, 'b> fn(Inv<'a>, Inv<'b>) = sub; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other | ||
| | ||
= note: expected fn pointer `for<'a, 'b> fn(Inv<'a>, Inv<'b>)` | ||
found fn pointer `for<'a> fn(Inv<'a>, Inv<'a>)` | ||
|
||
error: lifetime may not live long enough | ||
--> $DIR/placeholder-pattern-fail.rs:14:13 | ||
| | ||
LL | fn simple1<'c>(x: (&'c i32,)) { | ||
| -- lifetime `'c` defined here | ||
LL | let _x: (&'static i32,) = x; | ||
| ^^^^^^^^^^^^^^^ type annotation requires that `'c` must outlive `'static` | ||
|
||
error: lifetime may not live long enough | ||
--> $DIR/placeholder-pattern-fail.rs:19:12 | ||
| | ||
LL | fn simple2<'c>(x: (&'c i32,)) { | ||
| -- lifetime `'c` defined here | ||
LL | let _: (&'static i32,) = x; | ||
| ^^^^^^^^^^^^^^^ type annotation requires that `'c` must outlive `'static` | ||
|
||
error: aborting due to 4 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0308`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
error: higher-ranked lifetime error | ||
--> $DIR/re-empty-in-error.rs:8:5 | ||
| | ||
LL | foo(&10); | ||
| ^^^^^^^^ | ||
| | ||
= note: could not prove for<'b, 'r> &'b (): 'r | ||
|
||
error: aborting due to previous error | ||
|