trait_sel: resolve vars in host effects
In the standard library, the `Extend` impl for `Iterator` (specialised with `TrustedLen`) has a parameter which is constrained by a projection predicate. This projection predicate provides a value for an inference variable but host effect evaluation wasn't resolving variables first. Adding the extra resolve can the number of errors in some tests when they gain host effect predicates, but this is not unexpected as calls to `resolve_vars_if_possible` can cause more error tainting to happen. Co-authored-by: Boxy <rust@boxyuwu.dev>
This commit is contained in:
@@ -31,6 +31,8 @@ pub fn evaluate_host_effect_obligation<'tcx>(
|
||||
);
|
||||
}
|
||||
|
||||
let ref obligation = selcx.infcx.resolve_vars_if_possible(obligation.clone());
|
||||
|
||||
// Force ambiguity for infer self ty.
|
||||
if obligation.predicate.self_ty().is_ty_var() {
|
||||
return Err(EvaluationFailure::Ambiguous);
|
||||
|
||||
Reference in New Issue
Block a user