pub(super) fn resolve_vars_with_obligations(&self, mut ty: Ty<'tcx>) -> Ty<'tcx> {
        debug!("resolve_vars_with_obligations(ty={:?})", ty);

        // No Infer()? Nothing needs doing.
        if !ty.has_infer_types_or_consts() {
            debug!("resolve_vars_with_obligations: ty={:?}", ty);
            return ty;
        }

        // If `ty` is a type variable, see whether we already know what it is.
        ty = self.resolve_vars_if_possible(&ty);
        if !ty.has_infer_types_or_consts() {
            debug!("resolve_vars_with_obligations: ty={:?}", ty);
            return ty;
        }

        // If not, try resolving pending obligations as much as
        // possible. This can help substantially when there are
        // indirect dependencies that don't seem worth tracking
        // precisely.
        self.select_obligations_where_possible(false, |_| {});
        ty = self.resolve_vars_if_possible(&ty);

        debug!("resolve_vars_with_obligations: ty={:?}", ty);
        ty
    }
/// Resolves type and const variables in `ty` if possible. Unlike the infcx
/// version (resolve_vars_if_possible), this version will
/// also select obligations if it seems useful, in an effort
/// to get more type information.
Resolves type and const variables in `ty` if possible. Unlike the infcx
version (resolve_vars_if_possible), this version will
also select obligations if it seems useful, in an effort
to get more type information.
Resolves type and const variables in ` ty ` if possible . Unlike the infcx version ( resolve_vars_if_possible ) this version will also select obligations if it seems useful in an effort to get more type information .
pub(super) fn resolve_vars_with_obligations(&self, mut ty: Ty<'tcx>) -> Ty<'tcx> {
        debug!("resolve_vars_with_obligations(ty={:?})", ty);
        // No Infer()? Nothing needs doing.
        if !ty.has_infer_types_or_consts() {
            debug!("resolve_vars_with_obligations: ty={:?}", ty);
            return ty;
        }
        // If `ty` is a type variable, see whether we already know what it is.
        ty = self.resolve_vars_if_possible(&ty);
        if !ty.has_infer_types_or_consts() {
            debug!("resolve_vars_with_obligations: ty={:?}", ty);
            return ty;
        }
        // If not, try resolving pending obligations as much as
        // possible. This can help substantially when there are
        // indirect dependencies that don't seem worth tracking
        // precisely.
        self.select_obligations_where_possible(false, |_| {});
        ty = self.resolve_vars_if_possible(&ty);
        debug!("resolve_vars_with_obligations: ty={:?}", ty);
        ty
    }
pub ( super ) fn resolve_vars_with_obligations ( & self , mut ty : Ty < ' tcx > ) -> Ty < ' tcx > { debug ! ( " " ty ) ; // No Infer()? Nothing needs doing. if ! ty . has_infer_types_or_consts ( ) { debug ! ( " " ty ) ; return ty ; } // If `ty` is a type variable, see whether we already know what it is. ty = self . resolve_vars_if_possible ( & ty ) ; if ! ty . has_infer_types_or_consts ( ) { debug ! ( " " ty ) ; return ty ; } // If not, try resolving pending obligations as much as // possible. This can help substantially when there are // indirect dependencies that don't seem worth tracking // precisely. self . select_obligations_where_possible ( false , | _ | { } ) ; ty = self . resolve_vars_if_possible ( & ty ) ; debug ! ( " " ty ) ; ty }
Resolves type and const variables in `ty` if possible.
Resolves type and const variables in ` ty ` if possible .
&self
ty
Ty<'tcx>
&self
ty
Ty<'tcx>