fn query_result_substitution<R>(
        &self,
        cause: &ObligationCause<'tcx>,
        param_env: ty::ParamEnv<'tcx>,
        original_values: &SmallCanonicalVarValues<'tcx>,
        query_result: &Canonical<'tcx, QueryResult<'tcx, R>>,
    ) -> InferResult<'tcx, CanonicalVarValues<'tcx>>
    where
        R: Debug + TypeFoldable<'tcx>,
    {
        debug!(
            "query_result_substitution(original_values={:#?}, query_result={:#?})",
            original_values, query_result,
        );

        let result_subst =
            self.query_result_substitution_guess(cause, original_values, query_result);

        let obligations = self.unify_query_result_substitution_guess(
            cause,
            param_env,
            original_values,
            &result_subst,
            query_result,
        )?
            .into_obligations();

        Ok(InferOk {
            value: result_subst,
            obligations,
        })
    }
/// Given the original values and the (canonicalized) result from
/// computing a query, returns a substitution that can be applied
/// to the query result to convert the result back into the
/// original namespace.
///
/// The substitution also comes accompanied with subobligations
/// that arose from unification; these might occur if (for
/// example) we are doing lazy normalization and the value
/// assigned to a type variable is unified with an unnormalized
/// projection.
Given the original values and the (canonicalized) result from
computing a query, returns a substitution that can be applied
to the query result to convert the result back into the
original namespace.

The substitution also comes accompanied with subobligations
that arose from unification; these might occur if (for
example) we are doing lazy normalization and the value
assigned to a type variable is unified with an unnormalized
projection.
Given the original values and the ( canonicalized ) result from computing a query returns a substitution that can be applied to the query result to convert the result back into the original namespace . The substitution also comes accompanied with subobligations that arose from unification ; these might occur if ( for example ) we are doing lazy normalization and the value assigned to a type variable is unified with an unnormalized projection .
fn query_result_substitution<R>(
        &self,
        cause: &ObligationCause<'tcx>,
        param_env: ty::ParamEnv<'tcx>,
        original_values: &SmallCanonicalVarValues<'tcx>,
        query_result: &Canonical<'tcx, QueryResult<'tcx, R>>,
    ) -> InferResult<'tcx, CanonicalVarValues<'tcx>>
    where
        R: Debug + TypeFoldable<'tcx>,
    {
        debug!(
            "query_result_substitution(original_values={:#?}, query_result={:#?})",
            original_values, query_result,
        );
        let result_subst =
            self.query_result_substitution_guess(cause, original_values, query_result);
        let obligations = self.unify_query_result_substitution_guess(
            cause,
            param_env,
            original_values,
            &result_subst,
            query_result,
        )?
            .into_obligations();
        Ok(InferOk {
            value: result_subst,
            obligations,
        })
    }
fn query_result_substitution < R > ( & self , cause : & ObligationCause < ' tcx > , param_env : ty :: ParamEnv < ' tcx > , original_values : & SmallCanonicalVarValues < ' tcx > , query_result : & Canonical < ' tcx , QueryResult < ' tcx , R > > , ) -> InferResult < ' tcx , CanonicalVarValues < ' tcx > > where R : Debug + TypeFoldable < ' tcx > , { debug ! ( " " original_values query_result ) ; let result_subst = self . query_result_substitution_guess ( cause , original_values , query_result ) ; let obligations = self . unify_query_result_substitution_guess ( cause , param_env , original_values , & result_subst , query_result , ) ? . into_obligations ( ) ; Ok ( InferOk { value : result_subst , obligations , } ) }
Given the original values and the (canonicalized) result from
computing a query, returns a substitution that can be applied
to the query result to convert the result back into the
original namespace.
Given the original values and the ( canonicalized ) result from computing a query returns a substitution that can be applied to the query result to convert the result back into the original namespace .
&self
cause
&ObligationCause<'tcx>
param_env
ty::ParamEnv<'tcx>
original_values
&SmallCanonicalVarValues<'tcx>
query_result
&Canonical<'tcx, QueryResult<'tcx, R>>