-
Notifications
You must be signed in to change notification settings - Fork 13.4k
GATs outlives lint: Try to prove bounds #91849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+157
−50
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,10 +1,13 @@ | ||
error: Missing required bounds on TRef | ||
error: missing required bound on `TRef` | ||
--> $DIR/issue-86787.rs:11:5 | ||
| | ||
LL | type TRef<'a>; | ||
| ^^^^^^^^^^^^^- | ||
| | | ||
| help: add the required where clauses: `where Self: 'a` | ||
| help: add the required where clause: `where Self: 'a` | ||
| | ||
= note: this bound is currently required to ensure that impls have maximum flexibility | ||
= note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information | ||
|
||
error: aborting due to previous error | ||
|
This file contains hidden or 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
95 changes: 71 additions & 24 deletions
95
src/test/ui/generic-associated-types/self-outlives-lint.stderr
This file contains hidden or 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,98 +1,145 @@ | ||
error: Missing required bounds on Item | ||
error: missing required bound on `Item` | ||
--> $DIR/self-outlives-lint.rs:9:5 | ||
| | ||
LL | type Item<'x>; | ||
| ^^^^^^^^^^^^^- | ||
| | | ||
| help: add the required where clauses: `where Self: 'x` | ||
| help: add the required where clause: `where Self: 'x` | ||
| | ||
= note: this bound is currently required to ensure that impls have maximum flexibility | ||
= note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information | ||
|
||
error: Missing required bounds on Out | ||
error: missing required bound on `Out` | ||
--> $DIR/self-outlives-lint.rs:25:5 | ||
| | ||
LL | type Out<'x>; | ||
| ^^^^^^^^^^^^- | ||
| | | ||
| help: add the required where clauses: `where T: 'x` | ||
| help: add the required where clause: `where T: 'x` | ||
| | ||
= note: this bound is currently required to ensure that impls have maximum flexibility | ||
= note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information | ||
|
||
error: Missing required bounds on Out | ||
error: missing required bound on `Out` | ||
--> $DIR/self-outlives-lint.rs:39:5 | ||
| | ||
LL | type Out<'x>; | ||
| ^^^^^^^^^^^^- | ||
| | | ||
| help: add the required where clauses: `where T: 'x` | ||
| help: add the required where clause: `where T: 'x` | ||
| | ||
= note: this bound is currently required to ensure that impls have maximum flexibility | ||
= note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information | ||
|
||
error: Missing required bounds on Out | ||
error: missing required bounds on `Out` | ||
--> $DIR/self-outlives-lint.rs:46:5 | ||
| | ||
LL | type Out<'x, 'y>; | ||
| ^^^^^^^^^^^^^^^^- | ||
| | | ||
| help: add the required where clauses: `where T: 'x, U: 'y` | ||
| | ||
= note: these bounds are currently required to ensure that impls have maximum flexibility | ||
= note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information | ||
|
||
error: Missing required bounds on Out | ||
error: missing required bound on `Out` | ||
--> $DIR/self-outlives-lint.rs:61:5 | ||
| | ||
LL | type Out<'x, D>; | ||
| ^^^^^^^^^^^^^^^- | ||
| | | ||
| help: add the required where clauses: `where D: 'x` | ||
| help: add the required where clause: `where D: 'x` | ||
| | ||
= note: this bound is currently required to ensure that impls have maximum flexibility | ||
= note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information | ||
|
||
error: Missing required bounds on Out | ||
error: missing required bound on `Out` | ||
--> $DIR/self-outlives-lint.rs:77:5 | ||
| | ||
LL | type Out<'x, D>; | ||
| ^^^^^^^^^^^^^^^- | ||
| | | ||
| help: add the required where clauses: `where D: 'x` | ||
| help: add the required where clause: `where D: 'x` | ||
| | ||
= note: this bound is currently required to ensure that impls have maximum flexibility | ||
= note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information | ||
|
||
error: Missing required bounds on Out | ||
error: missing required bound on `Out` | ||
--> $DIR/self-outlives-lint.rs:92:5 | ||
| | ||
LL | type Out<'x, D>; | ||
| ^^^^^^^^^^^^^^^- | ||
| | | ||
| help: add the required where clauses: `where D: 'x` | ||
| help: add the required where clause: `where D: 'x` | ||
| | ||
= note: this bound is currently required to ensure that impls have maximum flexibility | ||
= note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information | ||
|
||
error: Missing required bounds on Bar | ||
error: missing required bounds on `Bar` | ||
--> $DIR/self-outlives-lint.rs:114:5 | ||
| | ||
LL | type Bar<'b>; | ||
| ^^^^^^^^^^^^- | ||
| | | ||
| help: add the required where clauses: `where Self: 'a, Self: 'b` | ||
| | ||
= note: these bounds are currently required to ensure that impls have maximum flexibility | ||
= note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information | ||
|
||
error: Missing required bounds on Bar | ||
error: missing required bound on `Bar` | ||
--> $DIR/self-outlives-lint.rs:122:5 | ||
| | ||
LL | type Bar<'b>; | ||
| ^^^^^^^^^^^^- | ||
| | | ||
| help: add the required where clauses: `where Self: 'a, Self: 'b` | ||
| help: add the required where clause: `where Self: 'b` | ||
| | ||
= note: this bound is currently required to ensure that impls have maximum flexibility | ||
= note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information | ||
|
||
error: Missing required bounds on Bar | ||
error: missing required bound on `Bar` | ||
--> $DIR/self-outlives-lint.rs:129:5 | ||
| | ||
LL | type Bar<'b>; | ||
| ^^^^^^^^^^^^- | ||
| | | ||
| help: add the required where clauses: `where Self: 'b` | ||
| help: add the required where clause: `where Self: 'b` | ||
| | ||
= note: this bound is currently required to ensure that impls have maximum flexibility | ||
= note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information | ||
|
||
error: Missing required bounds on Iterator | ||
error: missing required bound on `Iterator` | ||
--> $DIR/self-outlives-lint.rs:143:5 | ||
| | ||
LL | type Iterator<'a>: Iterator<Item = Self::Item<'a>>; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- | ||
| | | ||
| help: add the required where clauses: `where Self: 'a` | ||
| help: add the required where clause: `where Self: 'a` | ||
| | ||
= note: this bound is currently required to ensure that impls have maximum flexibility | ||
= note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information | ||
|
||
error: Missing required bounds on Bar | ||
--> $DIR/self-outlives-lint.rs:150:5 | ||
error: missing required bound on `Bar` | ||
--> $DIR/self-outlives-lint.rs:151:5 | ||
| | ||
LL | type Bar<'a, 'b>; | ||
| ^^^^^^^^^^^^^^^^- | ||
| | | ||
| help: add the required where clauses: `where 'a: 'b` | ||
| help: add the required where clause: `where 'b: 'a` | ||
| | ||
= note: this bound is currently required to ensure that impls have maximum flexibility | ||
= note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information | ||
|
||
error: missing required bound on `Fut` | ||
--> $DIR/self-outlives-lint.rs:167:5 | ||
| | ||
LL | type Fut<'out>; | ||
| ^^^^^^^^^^^^^^- | ||
| | | ||
| help: add the required where clause: `where 'ctx: 'out` | ||
| | ||
= note: this bound is currently required to ensure that impls have maximum flexibility | ||
= note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information | ||
|
||
error: aborting due to 12 previous errors | ||
error: aborting due to 13 previous errors | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is separate from the above logic; bug fix for #91036