[−][src]Function rustc_trait_selection::traits::project::poly_project_and_unify_type
pub(in traits) fn poly_project_and_unify_type<'cx, 'tcx>(
selcx: &mut SelectionContext<'cx, 'tcx>,
obligation: &Obligation<'tcx, PolyProjectionPredicate<'tcx>>
) -> Result<Result<Option<Vec<PredicateObligation<'tcx>>>, InProgress>, MismatchedProjectionTypes<'tcx>>
Evaluates constraints of the form:
for<...> <T as Trait>::U == V
If successful, this may result in additional obligations. Also returns the projection cache key used to track these additional obligations.
Returns
Err(_): the projection can be normalized, but is not equal to the expected type.Ok(Err(InProgress)): this is called recursively while normalizing the same projection.Ok(Ok(None)): The projection cannot be normalized due to ambiguity (resolving some inference variables in the projection may fix this).Ok(Ok(Some(obligations))): The projection bound holds subject to the given obligations. If the projection cannot be normalized because the required trait bound doesn't hold this returned withobligationsbeing a predicate that cannot be proven.