Description
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:
Still, the general strategy should be visible. Instead of using the inferred_obligations
vector, we basically just thread obligations around explicitly.