Review comments

This commit is contained in:
jackh726 2021-11-05 21:33:14 -04:00
parent ef5e31ac06
commit b6edcbd7b5
3 changed files with 51 additions and 22 deletions

View file

@ -109,6 +109,7 @@ trait NoGat<'a> {
}
// Lifetime is not on function; except `Self: 'a`
// FIXME: we require two bounds (`where Self: 'a, Self: 'b`) when we should only require one
trait TraitLifetime<'a> {
type Bar<'b>;
//~^ Missing required bounds
@ -116,6 +117,7 @@ trait TraitLifetime<'a> {
}
// Like above, but we have a where clause that can prove what we want
// FIXME: we require two bounds (`where Self: 'a, Self: 'b`) when we should only require one
trait TraitLifetimeWhere<'a> where Self: 'a {
type Bar<'b>;
//~^ Missing required bounds

View file

@ -28,7 +28,7 @@ error: Missing required bounds on Out
LL | type Out<'x, 'y>;
| ^^^^^^^^^^^^^^^^-
| |
| help: add the required where clauses: `where U: 'y, T: 'x`
| help: add the required where clauses: `where T: 'x, U: 'y`
error: Missing required bounds on Out
--> $DIR/self-outlives-lint.rs:61:5
@ -55,23 +55,23 @@ LL | type Out<'x, D>;
| help: add the required where clauses: `where D: 'x`
error: Missing required bounds on Bar
--> $DIR/self-outlives-lint.rs:113:5
--> $DIR/self-outlives-lint.rs:114:5
|
LL | type Bar<'b>;
| ^^^^^^^^^^^^-
| |
| help: add the required where clauses: `where Self: 'b, Self: 'a`
| help: add the required where clauses: `where Self: 'a, Self: 'b`
error: Missing required bounds on Bar
--> $DIR/self-outlives-lint.rs:120:5
--> $DIR/self-outlives-lint.rs:122:5
|
LL | type Bar<'b>;
| ^^^^^^^^^^^^-
| |
| help: add the required where clauses: `where Self: 'b, Self: 'a`
| help: add the required where clauses: `where Self: 'a, Self: 'b`
error: Missing required bounds on Bar
--> $DIR/self-outlives-lint.rs:127:5
--> $DIR/self-outlives-lint.rs:129:5
|
LL | type Bar<'b>;
| ^^^^^^^^^^^^-
@ -79,7 +79,7 @@ LL | type Bar<'b>;
| help: add the required where clauses: `where Self: 'b`
error: Missing required bounds on Iterator
--> $DIR/self-outlives-lint.rs:141:5
--> $DIR/self-outlives-lint.rs:143:5
|
LL | type Iterator<'a>: Iterator<Item = Self::Item<'a>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
@ -87,7 +87,7 @@ LL | type Iterator<'a>: Iterator<Item = Self::Item<'a>>;
| help: add the required where clauses: `where Self: 'a`
error: Missing required bounds on Bar
--> $DIR/self-outlives-lint.rs:148:5
--> $DIR/self-outlives-lint.rs:150:5
|
LL | type Bar<'a, 'b>;
| ^^^^^^^^^^^^^^^^-