pub fn instantiate_query_result_and_region_obligations<R>(
        &self,
        cause: &ObligationCause<'tcx>,
        param_env: ty::ParamEnv<'tcx>,
        original_values: &SmallCanonicalVarValues<'tcx>,
        query_result: &Canonical<'tcx, QueryResult<'tcx, R>>,
    ) -> InferResult<'tcx, R>
    where
        R: Debug + TypeFoldable<'tcx>,
    {
        let InferOk {
            value: result_subst,
            mut obligations,
        } = self.query_result_substitution(cause, param_env, original_values, query_result)?;

        obligations.extend(self.query_region_constraints_into_obligations(
            cause,
            param_env,
            &query_result.value.region_constraints,
            &result_subst,
        ));

        let user_result: R =
            query_result.substitute_projected(self.tcx, &result_subst, |q_r| &q_r.value);

        Ok(InferOk {
            value: user_result,
            obligations,
        })
    }
/// Given the (canonicalized) result to a canonical query,
/// instantiates the result so it can be used, plugging in the
/// values from the canonical query. (Note that the result may
/// have been ambiguous; you should check the certainty level of
/// the query before applying this function.)
///
/// To get a good understanding of what is happening here, check
/// out the [chapter in the rustc guide][c].
///
/// [c]: https://rust-lang-nursery.github.io/rustc-guide/traits/canonicalization.html#processing-the-canonicalized-query-result
Given the (canonicalized) result to a canonical query,
instantiates the result so it can be used, plugging in the
values from the canonical query. (Note that the result may
have been ambiguous; you should check the certainty level of
the query before applying this function.)

To get a good understanding of what is happening here, check
out the [chapter in the rustc guide][c].


Given the ( canonicalized ) result to a canonical query instantiates the result so it can be used plugging in the values from the canonical query . ( Note that the result may have been ambiguous ; you should check the certainty level of the query before applying this function . ) To get a good understanding of what is happening here check out the [ chapter in the rustc guide ] [ c ] .
pub fn instantiate_query_result_and_region_obligations<R>(
        &self,
        cause: &ObligationCause<'tcx>,
        param_env: ty::ParamEnv<'tcx>,
        original_values: &SmallCanonicalVarValues<'tcx>,
        query_result: &Canonical<'tcx, QueryResult<'tcx, R>>,
    ) -> InferResult<'tcx, R>
    where
        R: Debug + TypeFoldable<'tcx>,
    {
        let InferOk {
            value: result_subst,
            mut obligations,
        } = self.query_result_substitution(cause, param_env, original_values, query_result)?;
        obligations.extend(self.query_region_constraints_into_obligations(
            cause,
            param_env,
            &query_result.value.region_constraints,
            &result_subst,
        ));
        let user_result: R =
            query_result.substitute_projected(self.tcx, &result_subst, |q_r| &q_r.value);
        Ok(InferOk {
            value: user_result,
            obligations,
        })
    }
pub fn instantiate_query_result_and_region_obligations < R > ( & self , cause : & ObligationCause < ' tcx > , param_env : ty :: ParamEnv < ' tcx > , original_values : & SmallCanonicalVarValues < ' tcx > , query_result : & Canonical < ' tcx , QueryResult < ' tcx , R > > , ) -> InferResult < ' tcx , R > where R : Debug + TypeFoldable < ' tcx > , { let InferOk { value : result_subst , mut obligations , } = self . query_result_substitution ( cause , param_env , original_values , query_result ) ? ; obligations . extend ( self . query_region_constraints_into_obligations ( cause , param_env , & query_result . value . region_constraints , & result_subst , ) ) ; let user_result : R = query_result . substitute_projected ( self . tcx , & result_subst , | q_r | & q_r . value ) ; Ok ( InferOk { value : user_result , obligations , } ) }
Given the (canonicalized) result to a canonical query,
instantiates the result so it can be used, plugging in the
values from the canonical query.
Given the ( canonicalized ) result to a canonical query instantiates the result so it can be used plugging in the values from the canonical query .
&self
cause
&ObligationCause<'tcx>
param_env
ty::ParamEnv<'tcx>
original_values
&SmallCanonicalVarValues<'tcx>
query_result
&Canonical<'tcx, QueryResult<'tcx, R>>