Uplift outlives components to rustc_type_ir#127386
Merged
bors merged 3 commits intorust-lang:masterfrom Jul 6, 2024
Merged
Conversation
Collaborator
|
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
rustc_type_ir
lcnr
reviewed
Jul 6, 2024
Contributor
lcnr
left a comment
There was a problem hiding this comment.
while I feel like this doesn't necessary have to happen in this PR, I really think this should use a TypeVisitor instead. Computing the outlives components for trait objects is fairly non-trivial.
r=me on the existing changes
Contributor
Author
|
I could turn this into a TypeVisitor. The exceptions should be fairly obvious in that case. |
We could use rustc_middle::ty::outlives I guess?
aa76d30 to
c2a88ea
Compare
Contributor
Author
|
I'll do it in another PR tho since it's actually kinda gnarly because of this @bors r=lcnr |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 6, 2024
…mpiler-errors Rollup of 4 pull requests Successful merges: - rust-lang#127386 (Uplift outlives components to `rustc_type_ir`) - rust-lang#127405 (uplift `PredicateEmittingRelation`) - rust-lang#127410 (Correct description of E0502) - rust-lang#127417 (Show fnsig's unit output explicitly when there is output diff in diagnostics) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 6, 2024
Rollup merge of rust-lang#127386 - compiler-errors:uplift-outlives-components, r=lcnr Uplift outlives components to `rustc_type_ir` We need this to uplift `push_outlives_components`, since the elaborator uses `push_outlives_components` to elaborate type outlives obligations and I want to uplift elaboration. This ends up reworking and inlining a fair portion of the `GenericArg::walk_shallow` function, whose only callsite was this one. I believe I got the logic correct, but may be worthwhile to look at it closely just in case. Unfortunately github was too dumb to understand that this is a rename + change -- I could also rework the git history to split the "copy the file over" part from the actual logical changes if that makes this easier to review. 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.
We need this to uplift
push_outlives_components, since the elaborator usespush_outlives_componentsto elaborate type outlives obligations and I want to uplift elaboration.This ends up reworking and inlining a fair portion of the
GenericArg::walk_shallowfunction, whose only callsite was this one. I believe I got the logic correct, but may be worthwhile to look at it closely just in case. Unfortunately github was too dumb to understand that this is a rename + change -- I could also rework the git history to split the "copy the file over" part from the actual logical changes if that makes this easier to review.r? lcnr