-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Uplift outlives components to rustc_type_ir
#127386
Uplift outlives components to rustc_type_ir
#127386
Conversation
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
rustc_type_ir
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.
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
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
I'll do it in another PR tho since it's actually kinda gnarly because of this @bors r=lcnr |
…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
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
We need this to uplift
push_outlives_components
, since the elaborator usespush_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