-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Fix effect predicates from item bounds in old solver #134638
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
Merged
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion
3
tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs
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
3 changes: 1 addition & 2 deletions
3
tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs
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
35 changes: 0 additions & 35 deletions
35
tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.stderr
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail-2.current.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
error[E0277]: the trait bound `U: ~const Other` is not satisfied | ||
--> $DIR/assoc-type-const-bound-usage-fail-2.rs:24:5 | ||
| | ||
LL | T::Assoc::<U>::func(); | ||
| ^^^^^^^^^^^^^ | ||
|
||
error[E0277]: the trait bound `U: ~const Other` is not satisfied | ||
--> $DIR/assoc-type-const-bound-usage-fail-2.rs:27:5 | ||
| | ||
LL | <T as Trait>::Assoc::<U>::func(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
4 changes: 2 additions & 2 deletions
4
...ssoc-type-const-bound-usage-fail-2.stderr → ...type-const-bound-usage-fail-2.next.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
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
4 changes: 2 additions & 2 deletions
4
.../assoc-type-const-bound-usage-fail.stderr → ...ype-const-bound-usage-fail.current.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
15 changes: 15 additions & 0 deletions
15
tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.next.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
error[E0277]: the trait bound `T: ~const Trait` is not satisfied | ||
--> $DIR/assoc-type-const-bound-usage-fail.rs:17:5 | ||
| | ||
LL | T::Assoc::func(); | ||
| ^^^^^^^^ | ||
|
||
error[E0277]: the trait bound `T: ~const Trait` is not satisfied | ||
--> $DIR/assoc-type-const-bound-usage-fail.rs:19:5 | ||
| | ||
LL | <T as Trait>::Assoc::func(); | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
3 changes: 2 additions & 1 deletion
3
tests/ui/traits/const-traits/assoc-type-const-bound-usage-fail.rs
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
4 changes: 2 additions & 2 deletions
4
.../ui/traits/const-traits/assoc-type.stderr → ...ts/const-traits/assoc-type.current.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
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
error[E0277]: the trait bound `NonConstAdd: ~const Add` is not satisfied | ||
--> $DIR/assoc-type.rs:37:16 | ||
| | ||
LL | type Bar = NonConstAdd; | ||
| ^^^^^^^^^^^ | ||
| | ||
note: required by a bound in `Foo::Bar` | ||
--> $DIR/assoc-type.rs:33:15 | ||
| | ||
LL | type Bar: ~const Add; | ||
| ^^^^^^ required by this bound in `Foo::Bar` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
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
Oops, something went wrong.
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.
deeply_normalize_for_diagnostics
?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.
<T as Trait>::Assoc<U>
is notU
. There's no normalization happening here -- that's a rigid alias. This is due to the fact that the proof tree looks like:<T as Trait>::Assoc<U>: ~const Other
proven via an item bound requires:U: ~const Other
but we don't go deeper in the proof tree visitor b/c the nested obligation is not considered a where clause for the purposes of proof tree visitor. This may be fixed by #132345.