-
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
some trait system cleanups #120463
some trait system cleanups #120463
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…<try> never normalize without eager inference replacement unsure why we previously didn't do so, wasn't able to find an explanation in rust-lang#90887. This adds some complexity to the trait system and is afaict unnecessary, r? types cc `@jackh726`
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…<try> some trait system cleanups Always eagerly replace projections with infer vars if normalization is ambig. Unsure why we previously didn't do so, wasn't able to find an explanation in rust-lang#90887. This adds some complexity to the trait system and is afaict unnecessary. The second commit simplifies `pred_known_to_hold_modulo_regions`, afaict the optional `fulfill` isn't necessary anymore. r? types cc `@jackh726`
r=me after perf is clean. I also cannot remember why + don't believe it's meaningful to make this distinction when lazily normalizing. |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (1e74e30): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 660.078s -> 661.755s (0.25%) |
@bors r=jackh726,compiler-errors I don't remember why I made the Obviously, test suite passes and no perf regression - happy to remove it. |
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.
Actually, quick point. But the if
below the normalize call will always be true now: we won't ever not replace the projection, with either the type or an infer var.
@bors r- |
r=me with that change |
2b3867b
to
f996e18
Compare
only in evaluate, because we only do so for |
This comment has been minimized.
This comment has been minimized.
aa847c5
to
0b8770c
Compare
@rustbot ready |
☔ The latest upstream changes (presumably #121227) made this pull request unmergeable. Please resolve the merge conflicts. |
0b8770c
to
0c7672a
Compare
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.
but whatever, we'll find out the hard way
false | ||
} | ||
let obligation = Obligation::new(infcx.tcx, ObligationCause::dummy(), param_env, trait_ref); | ||
infcx.predicate_must_hold_modulo_regions(&obligation) |
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.
There's a fair chance this will cause regression bc we're no longer falling back to fulfillment in the local infcx lol
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.
we could do a crater run? think it's fine though, reverting this is straightforward 😀
@bors r+ rollup=never (so bisection is easier) |
☀️ Test successful - checks-actions |
Finished benchmarking commit (0243834): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 640.759s -> 640.857s (0.02%) |
Always eagerly replace projections with infer vars if normalization is ambig. Unsure why we previously didn't do so, wasn't able to find an explanation in #90887. This adds some complexity to the trait system and is afaict unnecessary.
The second commit simplifies
pred_known_to_hold_modulo_regions
, afaict the optionalfulfill
isn't necessary anymore.r? types cc @jackh726