Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare for using wfcheck on existential types
- Loading branch information
Showing
6 changed files
with
54 additions
and
36 deletions.
There are no files selected for viewing
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
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
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
21 changes: 11 additions & 10 deletions
21
src/test/ui/existential_types/generic_type_does_not_live_long_enough.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 |
---|---|---|
@@ -1,17 +1,18 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/generic_type_does_not_live_long_enough.rs:16:18 | ||
| | ||
LL | let z: i32 = x; //~ ERROR mismatched types | ||
| ^ expected i32, found anonymized type | ||
| | ||
= note: expected type `i32` | ||
found type `WrongGeneric::<&{integer}>` | ||
|
||
warning: not reporting region error due to nll | ||
--> $DIR/generic_type_does_not_live_long_enough.rs:16:1 | ||
--> $DIR/generic_type_does_not_live_long_enough.rs:19:1 | ||
| | ||
LL | existential type WrongGeneric<T>: 'static; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error[E0310]: the parameter type `T` may not live long enough | ||
--> $DIR/generic_type_does_not_live_long_enough.rs:20:5 | ||
| | ||
LL | t | ||
| ^ | ||
| | ||
= help: consider adding an explicit lifetime bound `T: 'static`... | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0310`. | ||
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
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