Try to mark param env as rigid with the next solver#158643
Conversation
the old solver doesn't register `TypeOutlives` and `RegionOutlives` goals if `ignoring_regions` is set. The new solver always registers these requirements, so we instead ignore errors caused by these constraints.
|
Haven't blessed tests or added comments. @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Try to mark param env as rigid with the next solver
This comment has been minimized.
This comment has been minimized.
ec1edbd to
2d5ce64
Compare
|
@bors try cancel |
|
Try build cancelled. Cancelled workflows: |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Try to mark param env as rigid with the next solver
This comment has been minimized.
This comment has been minimized.
2d5ce64 to
b021a94
Compare
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (0abe2a0): comparison URL. Overall result: ❌✅ regressions and improvements - 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 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 -0.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -0.7%)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: 486.291s -> 497.243s (2.25%) |
|
This PR changes a file inside |
|
Unsure which minimization is a valid regression test for |
|
hmm, good question :3 I think the largest typenum free minimization to make unknown issues easier to detect + all small mimimizations for the separate issues? might make sense to just have a list of all the minimization and how they cover each other. You want both all smallest and all largest minimizations :3 minimizations should form a poset |
b021a94 to
4f50819
Compare
This comment has been minimized.
This comment has been minimized.
| p | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
looking at this, we don't need a type folder here, we can just iterate through the caller_bounds manually and do that :>
| } | ||
| } | ||
|
|
||
| struct OpaqueToNonRigid<'tcx> { |
There was a problem hiding this comment.
could we merge that folder into RigidnessFolder by adding a RigidnessFolderMode or whatever?
| // So the rigidness marker is wrong. | ||
| predicates.fold_with(&mut OpaqueToNonRigid { tcx }) | ||
| } else { | ||
| ty::set_aliases_to_non_rigid(tcx, predicates).skip_norm_wip() |
There was a problem hiding this comment.
keep a comment for why we need to do this if the hack is disabled
(param_env used in different typingmode)
| //@ check-pass | ||
|
|
||
| // Regression test for trait-system-refactor-initiative#246 | ||
| // Fixed by eager norm and marking param env as rigid. |
There was a problem hiding this comment.
I feel like having both 7 and 8 is a bit too much as 7 isn't actually that much more approachable (both tests are kinda scary) so instead only having 8 as a test, but having its comment point to 246 and state that there are some intermediate minimizations in that issue, is probably better
| //@ check-pass | ||
| //@ edition: 2021 | ||
|
|
||
| // This was fixed by lazy norm of param env. |
There was a problem hiding this comment.
can you link to this PR here so people know what this means?
and can you change this test to use revisions?
|
some nits, I am otherwise happy with these changes, so it's just blocked on my PR :> |
4f50819 to
abbfac8
Compare
|
☔ The latest upstream changes (presumably #158795) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
View all comments
This PR tries to make normalization of param env behave exactly the same as the old solver.
Notably,
This fixes some overflow bugs we met in the next solver but unfix some other bugs (existing in the old solver).
See the blessed tests.
r? lcnr