Fold item bounds before proving them in check_type_bounds in new solver#125786
Merged
bors merged 2 commits intorust-lang:masterfrom May 31, 2024
Merged
Fold item bounds before proving them in check_type_bounds in new solver#125786bors merged 2 commits intorust-lang:masterfrom
check_type_bounds in new solver#125786bors merged 2 commits intorust-lang:masterfrom
Conversation
lcnr
reviewed
May 30, 2024
Comment on lines
+2029
to
+2030
| let trait_projection_ty = Ty::new_projection(tcx, trait_ty.def_id, rebased_args); | ||
| let impl_identity_ty = tcx.type_of(impl_ty.def_id).instantiate_identity(); |
Contributor
There was a problem hiding this comment.
move this into the next_solver branch?
Contributor
Author
There was a problem hiding this comment.
then it happens once per for mut obligation in util::elaborate(tcx, obligations) {.
I could invert the if statement, and duplicate the for loop?
Contributor
There was a problem hiding this comment.
you're right, didn't see the for loop 👍
Contributor
|
@bors r+ rollup |
Collaborator
Contributor
|
@bors rollup=always |
fmease
added a commit
to fmease/rust
that referenced
this pull request
May 30, 2024
…r=lcnr Fold item bounds before proving them in `check_type_bounds` in new solver Vaguely confident that this is sufficient to prevent rust-lang/trait-system-refactor-initiative#46 and rust-lang/trait-system-refactor-initiative#62. This is not the "correct" solution, but will probably suffice until coinduction, at which point we implement the right solution (`check_type_bounds` must prove `Assoc<...> alias-eq ConcreteType`, normalizing requires proving item bounds). r? lcnr
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 31, 2024
…lcnr Fold item bounds before proving them in `check_type_bounds` in new solver Vaguely confident that this is sufficient to prevent rust-lang/trait-system-refactor-initiative#46 and rust-lang/trait-system-refactor-initiative#62. This is not the "correct" solution, but will probably suffice until coinduction, at which point we implement the right solution (`check_type_bounds` must prove `Assoc<...> alias-eq ConcreteType`, normalizing requires proving item bounds). r? lcnr
Collaborator
Member
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 31, 2024
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#125635 (Rename HIR `TypeBinding` to `AssocItemConstraint` and related cleanup) - rust-lang#125774 (Avoid unwrap diag.code directly in note_and_explain_type_err) - rust-lang#125786 (Fold item bounds before proving them in `check_type_bounds` in new solver) - rust-lang#125790 (Don't recompute `tail` in `lower_stmts`) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 31, 2024
Rollup merge of rust-lang#125786 - compiler-errors:fold-item-bounds, r=lcnr Fold item bounds before proving them in `check_type_bounds` in new solver Vaguely confident that this is sufficient to prevent rust-lang/trait-system-refactor-initiative#46 and rust-lang/trait-system-refactor-initiative#62. This is not the "correct" solution, but will probably suffice until coinduction, at which point we implement the right solution (`check_type_bounds` must prove `Assoc<...> alias-eq ConcreteType`, normalizing requires proving item bounds). r? lcnr
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Vaguely confident that this is sufficient to prevent rust-lang/trait-system-refactor-initiative#46 and rust-lang/trait-system-refactor-initiative#62.
This is not the "correct" solution, but will probably suffice until coinduction, at which point we implement the right solution (
check_type_boundsmust proveAssoc<...> alias-eq ConcreteType, normalizing requires proving item bounds).r? lcnr