Repository navigation
Conversation
037ac33 to
06ec1ca
Compare
06ec1ca to
0cdc858
Compare
-Znext-solver
0cdc858 to
232b0ff
Compare
This comment has been minimized.
This comment has been minimized.
|
|
||
| if let Some((i, candidate)) = always_applicable { | ||
| return Some((candidate.result, MergeCandidateInfo::AlwaysApplicable(i))); | ||
| if rest.iter().any(|candidate| { |
There was a problem hiding this comment.
comment about what the behaviour of this fn is supposed to be, rn its kinda hard to figure it out imo
| } | ||
| } | ||
|
|
||
| fn response_only_references_shared_vars_outside_of_region_constraints<I: Interner>( |
There was a problem hiding this comment.
i dont understand the mental model behind what ur doing here xd slash in general somewhat confused by the concept of comparing canonical responses with different vars
that combined with it apparently just being wrong in the presence of opaque types and nested goals?
|
r? me |
This comment has been minimized.
This comment has been minimized.
232b0ff to
df707e1
Compare
|
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. |
|
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
gonna try instead actually instantiating the canonical response and recanonicalizing modulo region constraints which is more trivially correct |
This is for the sake future compatibility, see https://rust-lang.zulipchat.com/#narrow/channel/144729-t-types/topic/resolving.20equal.20regions/near/623504310 for more background. Integrated changes to make this not cause any crater regression, see #133502 (comment) where we did an accidental crater run only for this change.
I would generally like us to not be region dependent at all. For this we need the following:
stalled_onshouldn't have to track region variablesFor this to work candidate merging has to always merge the region constraints of all candidates and can't rely on there being no region constraints. This in turn means that as long as there's an ambiguous candidate, we can't use another candidate which is known to hold, as the ambiguous candidate may end up resulting in fewer region constraints than the existing options.
This change does prevent us from discarding
HeadUsagesof other where-bounds if one where-bound holds without any constraints. This will cause hangs if we allow using a non-rigidParamEnvfor normalization in rust-lang/trait-system-refactor-initiative#210.This also has annoying interactions with weakening impl shadowing. I am really unsure about the long-term plan here. We may revert this change in the future because the tradeoff isn't worth it, unsure. By doing it for now we're future compatible with whatever we want to do.
The cycle handling tests are better tested by https://github.com/lcnr/search_graph_fuzz, having subtle cycle handling tests as ui tests is very brittle and very easily stops testing the right thing.
cc rust-lang/trait-system-refactor-initiative#305, see the added test
r? types