-> bool
{
// In general, it's a good idea to cache results, even
- // ambigious ones, to save us some trouble later. But we have
+ // ambiguous ones, to save us some trouble later. But we have
// to be careful not to cache results that could be
// invalidated later by advances in inference. Normally, this
// is not an issue, because any inference variables whose
///
/// - The impl is conditional, in which case we may not have winnowed it out
/// because we don't know if the conditions apply, but the where clause is basically
- /// telling us taht there is some impl, though not necessarily the one we see.
+ /// telling us that there is some impl, though not necessarily the one we see.
///
/// In both cases we prefer to take the where clause, which is
/// essentially harmless. See issue #18453 for more details of
// the where clauses are in scope.
true
}
- (&ParamCandidate(ref bound1), &ParamCandidate(ref bound2)) => {
- self.infcx.probe(|_| {
- let bound1 =
- project::normalize_with_depth(self,
- stack.obligation.cause.clone(),
- stack.obligation.recursion_depth+1,
- bound1);
- let bound2 =
- project::normalize_with_depth(self,
- stack.obligation.cause.clone(),
- stack.obligation.recursion_depth+1,
- bound2);
- let origin =
- infer::RelateOutputImplTypes(stack.obligation.cause.span);
- self.infcx
- .sub_poly_trait_refs(false, origin, bound1.value, bound2.value)
- .is_ok()
- })
- }
_ => {
false
}