🛠️ refactor away the inferred_obligations
from the trait selector
#48672
Labels
A-trait-system
Area: Trait system
WG-traits
Working group: Traits, https://internals.rust-lang.org/t/announcing-traits-working-group/6804
The
SelectionContext
currently has this vector,inferred_obligations
:rust/src/librustc/traits/select.rs
Line 95 in 9cb18a9
It is used to accumulate obligations during matching operations and so forth that takes in a
select
, for example here:rust/src/librustc/traits/select.rs
Line 1559 in 9cb18a9
These are then stored in the vector and later added to the candidate currently under construction:
rust/src/librustc/traits/select.rs
Lines 565 to 566 in 9cb18a9
It's a kinda confusing setup, since the flow of information is hidden, and it's not really needed. This commit factors it away, but it does so in the context of a long branch, and can't really be directly cherry-picked:
nikomatsakis@627a2b4
Still, the general strategy should be visible. Instead of using the
inferred_obligations
vector, we basically just thread obligations around explicitly.The text was updated successfully, but these errors were encountered: