Introduce enter_forall to supercede instantiate_binder_with_placeholders#120544
Introduce enter_forall to supercede instantiate_binder_with_placeholders#120544bors merged 3 commits intorust-lang:masterfrom
enter_forall to supercede instantiate_binder_with_placeholders#120544Conversation
|
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor Type relation code was changed |
|
☔ The latest upstream changes (presumably #120620) made this pull request unmergeable. Please resolve the merge conflicts. |
lcnr
left a comment
There was a problem hiding this comment.
some nits, then r=me. Please make sure to remove all FIXME(tree_universes) from enter_forall calls
compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
Outdated
Show resolved
Hide resolved
9544ee1 to
b6f0a77
Compare
|
@bors r=lcnr rollup=never |
|
@bors r- |
|
it would be nice if this pr got a description too :> i know what it's doing, but others may not |
|
I KNEW I FORGOT SOMETHING |
|
r=me after ci |
This comment has been minimized.
This comment has been minimized.
|
@bors r=lcnr rollup=never |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (c29082f): 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)This benchmark run did not return any relevant results for this metric. 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: 662.316s -> 662.416s (0.02%) |
r? @lcnr
Long term we'd like to experiment with decrementing the universe count after "exiting" binders so that we do not end up creating infer vars in non-root universes even when they logically reside in the root universe. The fact that we dont do this currently results in a number of issues in the new trait solver where we consider goals to be ambiguous because otherwise it would require lowering the universe of an infer var. i.e. the goal
?x.0 eq <T as Trait<?y.1>>::Assocwhere the alias is rigid would not be able to instantiate?xwith the alias as there would be a universe error.This PR is the first-ish sort of step towards being able to implement this as eventually we would want to decrement the universe in
enter_forall. Unfortunately its Difficult to actually implement decrementing universes nicely so this is a separate step which moves us closer to the long term goal ✨