-
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.
Stop proving outlives constraints on regions we already reported erro…
…rs on
- Loading branch information
Showing
25 changed files
with
97 additions
and
246 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
// This test ensures that it's not crashing rustdoc. | ||
|
||
pub struct Foo<'a, 'b, T> { | ||
field1: dyn Bar<'a, 'b,>, | ||
field1: dyn Bar<'a, 'b>, | ||
//~^ ERROR | ||
//~| ERROR | ||
//~| ERROR | ||
} | ||
|
||
pub trait Bar<'x, 's, U> | ||
where U: 'x, | ||
Self:'x, | ||
Self:'s | ||
{} | ||
where | ||
U: 'x, | ||
Self: 'x, | ||
Self: 's, | ||
{ | ||
} |
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,26 +1,43 @@ | ||
error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied | ||
--> $DIR/unable-fulfill-trait.rs:4:17 | ||
| | ||
LL | field1: dyn Bar<'a, 'b,>, | ||
LL | field1: dyn Bar<'a, 'b>, | ||
| ^^^ expected 1 generic argument | ||
| | ||
note: trait defined here, with 1 generic parameter: `U` | ||
--> $DIR/unable-fulfill-trait.rs:9:11 | ||
--> $DIR/unable-fulfill-trait.rs:10:11 | ||
| | ||
LL | pub trait Bar<'x, 's, U> | ||
| ^^^ - | ||
help: add missing generic argument | ||
| | ||
LL | field1: dyn Bar<'a, 'b, U,>, | ||
LL | field1: dyn Bar<'a, 'b, U>, | ||
| +++ | ||
|
||
error[E0227]: ambiguous lifetime bound, explicit lifetime bound required | ||
--> $DIR/unable-fulfill-trait.rs:4:13 | ||
| | ||
LL | field1: dyn Bar<'a, 'b,>, | ||
| ^^^^^^^^^^^^^^^^ | ||
LL | field1: dyn Bar<'a, 'b>, | ||
| ^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
error[E0478]: lifetime bound not satisfied | ||
--> $DIR/unable-fulfill-trait.rs:4:13 | ||
| | ||
LL | field1: dyn Bar<'a, 'b>, | ||
| ^^^^^^^^^^^^^^^ | ||
| | ||
note: lifetime parameter instantiated with the lifetime `'b` as defined here | ||
--> $DIR/unable-fulfill-trait.rs:3:20 | ||
| | ||
LL | pub struct Foo<'a, 'b, T> { | ||
| ^^ | ||
note: but lifetime parameter must outlive the lifetime `'a` as defined here | ||
--> $DIR/unable-fulfill-trait.rs:3:16 | ||
| | ||
LL | pub struct Foo<'a, 'b, T> { | ||
| ^^ | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
Some errors have detailed explanations: E0107, E0227. | ||
Some errors have detailed explanations: E0107, E0227, E0478. | ||
For more information about an error, try `rustc --explain E0107`. |
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
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
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
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
2 changes: 0 additions & 2 deletions
2
tests/ui/impl-trait/in-trait/bad-item-bound-within-rpitit-2.rs
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,11 +1,9 @@ | ||
// issue: 114146 | ||
|
||
|
||
trait Foo { | ||
fn bar<'other: 'a>() -> impl Sized + 'a {} | ||
//~^ ERROR use of undeclared lifetime name `'a` | ||
//~| ERROR use of undeclared lifetime name `'a` | ||
//~| ERROR expected generic lifetime parameter, found `'static` | ||
} | ||
|
||
fn main() {} |
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
Oops, something went wrong.