modify alias-relate to also normalize ambiguous opaques#120549
Merged
bors merged 4 commits intorust-lang:masterfrom Feb 13, 2024
Merged
modify alias-relate to also normalize ambiguous opaques#120549bors merged 4 commits intorust-lang:masterfrom
bors merged 4 commits intorust-lang:masterfrom
Conversation
Collaborator
|
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
a9cdad2 to
80218a5
Compare
This comment has been minimized.
This comment has been minimized.
|
|
||
| let typeck_results = fcx.resolve_type_vars_in_body(body); | ||
|
|
||
| let _ = fcx.infcx.take_opaque_types(); |
Contributor
There was a problem hiding this comment.
Why? Needs a comment at least.
| #[instrument(skip(self), level = "debug")] | ||
| fn visit_opaque_types(&mut self) { | ||
| let opaque_types = self.fcx.infcx.take_opaque_types(); | ||
| // We clone the opaques instead of stealing them here as they are still used for |
compiler-errors
approved these changes
Feb 5, 2024
Contributor
|
@bors r+ |
Collaborator
Contributor
|
oh new solver @bors rollup |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Feb 6, 2024
modify alias-relate to also normalize ambiguous opaques allows a bunch of further cleanups and generally simplifies the type system. To handle rust-lang/trait-system-refactor-initiative#8 we'll have to add a some additional complexity to the `(Alias, Infer)` branches in alias-relate, so removing the opaque type special case here is really valuable. It does worsen `deduce_closure_signature` and friends even more as they now receive an inference variable which is only constrained via an `AliasRelate` goal. These probably have to look into alias relate goals somehow. Leaving that for a future PR as this is something we'll have to tackle regardless. r? `@compiler-errors`
Member
|
I suspect that this failed here: |
Contributor
Author
|
fixed CI @bors r=compiler-errors |
Collaborator
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Feb 8, 2024
modify alias-relate to also normalize ambiguous opaques allows a bunch of further cleanups and generally simplifies the type system. To handle rust-lang/trait-system-refactor-initiative#8 we'll have to add a some additional complexity to the `(Alias, Infer)` branches in alias-relate, so removing the opaque type special case here is really valuable. It does worsen `deduce_closure_signature` and friends even more as they now receive an inference variable which is only constrained via an `AliasRelate` goal. These probably have to look into alias relate goals somehow. Leaving that for a future PR as this is something we'll have to tackle regardless. r? `@compiler-errors`
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Feb 8, 2024
modify alias-relate to also normalize ambiguous opaques allows a bunch of further cleanups and generally simplifies the type system. To handle rust-lang/trait-system-refactor-initiative#8 we'll have to add a some additional complexity to the `(Alias, Infer)` branches in alias-relate, so removing the opaque type special case here is really valuable. It does worsen `deduce_closure_signature` and friends even more as they now receive an inference variable which is only constrained via an `AliasRelate` goal. These probably have to look into alias relate goals somehow. Leaving that for a future PR as this is something we'll have to tackle regardless. r? ``@compiler-errors``
Member
|
@bors r- |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 9, 2024
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#120584 (For a rigid projection, recursively look at the self type's item bounds to fix the `associated_type_bounds` feature) - rust-lang#120589 (std::thread::available_parallelism merging linux/android/freebsd version) - rust-lang#120596 ([rustdoc] Correctly generate path for non-local items in source code pages) - rust-lang#120629 (Move some test files) - rust-lang#120846 (Update jobserver-rs to 0.1.28) - rust-lang#120850 (ast_lowering: Fix regression in `use ::{}` imports.) - rust-lang#120853 (Avoid a collection and iteration on empty passes) Failed merges: - rust-lang#120549 (modify alias-relate to also normalize ambiguous opaques) r? `@ghost` `@rustbot` modify labels: rollup
Collaborator
|
☔ The latest upstream changes (presumably #120852) made this pull request unmergeable. Please resolve the merge conflicts. |
with this, alias-relate treats all aliases the same way and it can be used for structural normalization.
Contributor
Author
|
@rustbot ready |
Contributor
Author
|
@bors r=compiler-errors |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 13, 2024
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#114877 (unstable-book: add quick-edit link) - rust-lang#120548 (rustdoc: Fix handling of doc_auto_cfg feature for cfg attributes on glob reexport) - rust-lang#120549 (modify alias-relate to also normalize ambiguous opaques) - rust-lang#120959 (Remove good path delayed bugs) - rust-lang#120978 (match lowering: simplify block creation) - rust-lang#121019 (coverage: Simplify some parts of the coverage span refiner) - rust-lang#121021 (Extend intra-doc link chapter in the rustdoc book) - rust-lang#121031 (RustWrapper: adapt for coverage mapping API changes) Failed merges: - rust-lang#121014 (Remove `force_print_diagnostic`) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 13, 2024
Rollup merge of rust-lang#120549 - lcnr:errs-showcase, r=compiler-errors modify alias-relate to also normalize ambiguous opaques allows a bunch of further cleanups and generally simplifies the type system. To handle rust-lang/trait-system-refactor-initiative#8 we'll have to add a some additional complexity to the `(Alias, Infer)` branches in alias-relate, so removing the opaque type special case here is really valuable. It does worsen `deduce_closure_signature` and friends even more as they now receive an inference variable which is only constrained via an `AliasRelate` goal. These probably have to look into alias relate goals somehow. Leaving that for a future PR as this is something we'll have to tackle regardless. r? `@compiler-errors`
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Feb 22, 2024
…lcnr No need to `validate_alias_bound_self_from_param_env` in `assemble_alias_bound_candidates` We already fully normalize the self type before we reach `assemble_alias_bound_candidates`, so there's no reason to double check that a projection is truly rigid by checking param-env bounds. I think this is also blocked on us making sure to always normalize opaques: rust-lang#120549. r? lcnr
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Feb 22, 2024
…lcnr No need to `validate_alias_bound_self_from_param_env` in `assemble_alias_bound_candidates` We already fully normalize the self type before we reach `assemble_alias_bound_candidates`, so there's no reason to double check that a projection is truly rigid by checking param-env bounds. I think this is also blocked on us making sure to always normalize opaques: rust-lang#120549. r? lcnr
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 22, 2024
Rollup merge of rust-lang#120598 - compiler-errors:no-rigid-check, r=lcnr No need to `validate_alias_bound_self_from_param_env` in `assemble_alias_bound_candidates` We already fully normalize the self type before we reach `assemble_alias_bound_candidates`, so there's no reason to double check that a projection is truly rigid by checking param-env bounds. I think this is also blocked on us making sure to always normalize opaques: rust-lang#120549. 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.
allows a bunch of further cleanups and generally simplifies the type system. To handle rust-lang/trait-system-refactor-initiative#8 we'll have to add a some additional complexity to the
(Alias, Infer)branches in alias-relate, so removing the opaque type special case here is really valuable.It does worsen
deduce_closure_signatureand friends even more as they now receive an inference variable which is only constrained via anAliasRelategoal. These probably have to look into alias relate goals somehow. Leaving that for a future PR as this is something we'll have to tackle regardless.r? @compiler-errors