-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Imply outlives-bounds on lazy type aliases
- Loading branch information
Showing
5 changed files
with
211 additions
and
97 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
34 changes: 34 additions & 0 deletions
34
tests/ui/lazy-type-alias/implied-outlives-bounds.neg.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,34 @@ | ||
error: lifetime may not live long enough | ||
--> $DIR/implied-outlives-bounds.rs:21:12 | ||
| | ||
LL | fn env0<'any>() { | ||
| ---- lifetime `'any` defined here | ||
LL | let _: TypeOutlives<'static, &'any ()>; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'any` must outlive `'static` | ||
|
||
error: lifetime may not live long enough | ||
--> $DIR/implied-outlives-bounds.rs:26:12 | ||
| | ||
LL | fn env1<'any>() { | ||
| ---- lifetime `'any` defined here | ||
LL | let _: RegionOutlives<'static, 'any>; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'any` must outlive `'static` | ||
|
||
error: lifetime may not live long enough | ||
--> $DIR/implied-outlives-bounds.rs:31:12 | ||
| | ||
LL | fn env2<'any>() { | ||
| ---- lifetime `'any` defined here | ||
LL | let _: Outer0<'static, &'any ()>; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'any` must outlive `'static` | ||
|
||
error: lifetime may not live long enough | ||
--> $DIR/implied-outlives-bounds.rs:36:12 | ||
| | ||
LL | fn env3<'any>() { | ||
| ---- lifetime `'any` defined here | ||
LL | let _: Outer1<'static, &'any ()>; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'any` must outlive `'static` | ||
|
||
error: aborting due to 4 previous errors | ||
|
Oops, something went wrong.