Normalize before checking trivial bounds#159118
Conversation
|
Seems like CI is failing because of this proc macro in salsa: https://github.com/salsa-rs/salsa/blob/5e239195eee4e54440b84593396ec1c8ca37146c/components/salsa-macro-rules/src/setup_tracked_fn.rs#L495-L497 So I guess it's a hacky version of "trivial_bounds but for stable" to make set_lru_capacity uncallable when the lru's size isn't provided?
|
This comment has been minimized.
This comment has been minimized.
I think not checking trivial bounds if they are higher ranked where-clauses is intended. We want to give users a way to opt-out of this check and this is something that users rely on. I want us to continue to ignore |
|
Ah got it, I looked through #48214 and couldn't find much discussion as to whether this should be allowed or not, so thanks for clarifying. I updated the tests and changed it back to |
This comment has been minimized.
This comment has been minimized.
|
This PR modifies |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This PR changes a file inside |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@bors try @rust-timer queue let's do a crater run 😁 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Normalize before checking trivial bounds
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (ac56ae8): comparison URL. Overall result: ❌ regressions - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary 4.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 487.476s -> 490.061s (0.53%) |
|
☔ The latest upstream changes (presumably #154989) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
Based on #140313
zulip discussion: #t-types > working on issue #154145
Currently, if a trivial bound is placed on an assoc type, and the type contains generics,
check_false_global_boundsimproperly tries to prove the predicate globally, since normalization, which would reveal the generics, happens only after theis_global()check. This PR moves normalization occur before the globality check. Additionally, we skip only the outermost HRTB withpred.kind().bound_vars().is_empty()rather than checking!pred.has_type_flags(TypeFlags::HAS_BINDER_VARS).As a consequence of normalizing, this PR emits errors for code like this, which currently compiles:
fixes #154145
fixes #140309
r? lcnr