Repository navigation
session: Enable next-solver globally for assumptions-on-binders - #160513
rust-bors[bot] merged 4 commits into
Conversation
Normalize next_solver after -Z parsing so flag order does not matter and direct readers of next_solver.globally see the effective config.
Cover the flag alone, both orderings with -Znext-solver, override of -Znext-solver=no, and a UI test that no longer passes -Znext-solver.
|
r? @chenyukang rustbot has assigned @chenyukang. Use Why was this reviewer chosen?The reviewer was selected based on:
|
943cc32 to
57722cb
Compare
|
lgtm, but it's better r? @lcnr take a look. |
| @@ -1,4 +1,4 @@ | |||
| //@ compile-flags: -Znext-solver -Zassumptions-on-binders | |||
| //@ compile-flags: -Zassumptions-on-binders | |||
There was a problem hiding this comment.
We can remove the -Znext-solver from other tests in assumptions_on_binders.
There was a problem hiding this comment.
Yep, done. Cleared -Znext-solver / -Znext-solver=globally off the other six tests in that folder. They're redundant once -Zassumptions-on-binders turns the next solver on globally.
| if unstable_opts.assumptions_on_binders { | ||
| unstable_opts.next_solver = NextSolverConfig { coherence: true, globally: true }; | ||
| } |
There was a problem hiding this comment.
Should we add a warning in case if a user adds -Znext-solver=no and -Zassumptions-on-binders, saying using -Zassumption-on-binders unconditionally enables next solver?
There was a problem hiding this comment.
Yep. Overriding an explicit -Znext-solver=no without saying anything felt too sneaky, so I added an early warning instead of a hard error:
-Zassumptions-on-binders unconditionally enables the next trait solver; `-Znext-solver=no` is ignored
We only warn when next_solver.coherence is false, which is the =no case. UI test is next-solver-no-overridden.rs.
-Zassumptions-on-binders already forces the next solver globally, so the explicit -Znext-solver flags in these sibling tests do nothing.
-Zassumptions-on-binders still forces the next solver globally, but an explicit -Znext-solver=no is surprising to discard silently. Emit an early warning in that case, matching the staticlib-hide-internal-symbols precedent for conflicting -Z combos.
|
@bors r=lcnr,bit-aloo |
|
@bors rollup=never |
|
I suppose this should fix #160256 ? |
|
@bors p=6 |
This comment has been minimized.
This comment has been minimized.
…t_solver, r=lcnr,bit-aloo session: Enable next-solver globally for assumptions-on-binders Zulip: https://rust-lang.zulipchat.com/#narrow/channel/618216-t-types.2Fcall-for-participation/topic/assumptions.20on.20binders.3A.20enable.20next-solver.20automatically/with/614548133 `-Zassumptions-on-binders` already needs the next trait solver, but you still had to pass `-Znext-solver` by hand. Easy to forget, and some spots (feature gates) read `next_solver.globally` directly, so just special-casing `next_trait_solver_globally()` wouldn't cut it. After `-Z` parsing, if assumptions-on-binders is on, force `NextSolverConfig { coherence: true, globally: true }`. Same pattern as `-Zretpoline-external-thunk`. Flag order doesn't matter. `-Znext-solver=no` gets overridden too; imo that's the right call since the assumptions code can't run on the old solver. A hard conflict error would also be fine, just more annoying for day-to-day hacking. Covered the flag alone, both orderings, and `=no` in a unit test. Dropped the explicit `-Znext-solver` from one UI test under `assumptions_on_binders`. btw idk if we should strip `-Znext-solver` from the rest of that folder asap or leave the redundancy. irl I'd leave it for now. fyi this also means anything checking `next_solver.globally` sees the effective config. ltm if you'd rather go the conflict-error route instead of overriding `=no`.
|
@bors cancel |
|
Auto build was cancelled. Cancelled workflows: The next pull request likely to be tested is #160513. |
This comment has been minimized.
This comment has been minimized.
…t_solver, r=lcnr,bit-aloo session: Enable next-solver globally for assumptions-on-binders Zulip: https://rust-lang.zulipchat.com/#narrow/channel/618216-t-types.2Fcall-for-participation/topic/assumptions.20on.20binders.3A.20enable.20next-solver.20automatically/with/614548133 `-Zassumptions-on-binders` already needs the next trait solver, but you still had to pass `-Znext-solver` by hand. Easy to forget, and some spots (feature gates) read `next_solver.globally` directly, so just special-casing `next_trait_solver_globally()` wouldn't cut it. After `-Z` parsing, if assumptions-on-binders is on, force `NextSolverConfig { coherence: true, globally: true }`. Same pattern as `-Zretpoline-external-thunk`. Flag order doesn't matter. `-Znext-solver=no` gets overridden too; imo that's the right call since the assumptions code can't run on the old solver. A hard conflict error would also be fine, just more annoying for day-to-day hacking. Covered the flag alone, both orderings, and `=no` in a unit test. Dropped the explicit `-Znext-solver` from one UI test under `assumptions_on_binders`. btw idk if we should strip `-Znext-solver` from the rest of that folder asap or leave the redundancy. irl I'd leave it for now. fyi this also means anything checking `next_solver.globally` sees the effective config. ltm if you'd rather go the conflict-error route instead of overriding `=no`.
|
Looks like this failed to start. @bors yield |
|
Auto build was cancelled. Cancelled workflows: The next pull request likely to be tested is #160513. |
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 84b36a7 (parent) -> 88f7399 (this PR) Test differencesShow 7 test diffsStage 0
Stage 1
Stage 2
Additionally, 2 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 88f7399cb4912680976e1c342ea7661b9dc84940 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (88f7399): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -3.6%, secondary -6.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 17.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: 457.798s -> 460.09s (0.50%) |
Zulip: https://rust-lang.zulipchat.com/#narrow/channel/618216-t-types.2Fcall-for-participation/topic/assumptions.20on.20binders.3A.20enable.20next-solver.20automatically/with/614548133
-Zassumptions-on-bindersalready needs the next trait solver, but you still had to pass-Znext-solverby hand. Easy to forget, and some spots (feature gates) readnext_solver.globallydirectly, so just special-casingnext_trait_solver_globally()wouldn't cut it.After
-Zparsing, if assumptions-on-binders is on, forceNextSolverConfig { coherence: true, globally: true }. Same pattern as-Zretpoline-external-thunk. Flag order doesn't matter.-Znext-solver=nogets overridden too; imo that's the right call since the assumptions code can't run on the old solver. A hard conflict error would also be fine, just more annoying for day-to-day hacking.Covered the flag alone, both orderings, and
=noin a unit test. Dropped the explicit-Znext-solverfrom one UI test underassumptions_on_binders.btw idk if we should strip
-Znext-solverfrom the rest of that folder asap or leave the redundancy. irl I'd leave it for now. fyi this also means anything checkingnext_solver.globallysees the effective config. ltm if you'd rather go the conflict-error route instead of overriding=no.