Structurally normalize weak and inherent in new solver#114594
Merged
bors merged 2 commits intorust-lang:masterfrom Aug 8, 2023
Merged
Structurally normalize weak and inherent in new solver#114594bors merged 2 commits intorust-lang:masterfrom
bors merged 2 commits intorust-lang:masterfrom
Conversation
Contributor
Author
|
I thought I already had this included somewhere in some other PR, but I may have rebased it out by accident. Maybe I totally forgor and this is already up in some other PR. |
Contributor
|
@bors r+ rollup (should only affect new solver) |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 8, 2023
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#114376 (Avoid exporting __rust_alloc_error_handler_should_panic more than once.) - rust-lang#114413 (Warn when #[macro_export] is applied on decl macros) - rust-lang#114497 (Revert rust-lang#98333 "Re-enable atomic loads and stores for all RISC-V targets") - rust-lang#114500 (Remove arm crypto target feature) - rust-lang#114566 (Store the laziness of type aliases in their `DefKind`) - rust-lang#114594 (Structurally normalize weak and inherent in new solver) - rust-lang#114596 (Rename method in `opt-dist`) r? `@ghost` `@rustbot` modify labels: rollup
compiler-errors
commented
Aug 9, 2023
| cause: Option<ObligationCause<'tcx>>, | ||
| ) -> RelateResult<'tcx, Ty<'tcx>> { | ||
| let source = self.try_structurally_resolve_type(expr.span, expr_ty); | ||
| let target = self.try_structurally_resolve_type( |
Contributor
Author
Member
There was a problem hiding this comment.
I’ll check if cachegrind has anything interesting to say
Contributor
Author
There was a problem hiding this comment.
I'm also just getting rid of this one line and running perf in #114648.
Contributor
Author
There was a problem hiding this comment.
If this is the culprit, I guess I may be able to work around it.
Member
There was a problem hiding this comment.
Processing obligations seems to be the main source of change, but hopefully we'll learn more in the new PR if it's not some kind of noise.
260,711,737 ???:<rustc_data_structures::obligation_forest::ObligationForest<rustc_trait_selection::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection::traits::fulfill::FulfillProcessor>
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 10, 2023
Only resolve target type in `try_coerce` in new solver Only needed in new solver, seems to affect perf in old solver. cc rust-lang#114604/rust-lang#114594
6 tasks
3 tasks
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.
It seems pretty obvious to me that we should be normalizing weak and inherent aliases too, since they can always be normalized. This PR still leaves open the question of what to do with opaques, though 💀
Also, we need to structurally resolve the target of a coercion, for the UI test to work.
r? @lcnr