From e489a94deef3d41513fe4254804d730f0fd6cbc0 Mon Sep 17 00:00:00 2001 From: mark Date: Sun, 23 Jan 2022 12:34:26 -0600 Subject: rename ErrorReported -> ErrorGuaranteed --- compiler/rustc_ty_utils/src/instance.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'compiler/rustc_ty_utils/src/instance.rs') diff --git a/compiler/rustc_ty_utils/src/instance.rs b/compiler/rustc_ty_utils/src/instance.rs index 91c4398c178..41467ce2f62 100644 --- a/compiler/rustc_ty_utils/src/instance.rs +++ b/compiler/rustc_ty_utils/src/instance.rs @@ -1,4 +1,4 @@ -use rustc_errors::ErrorReported; +use rustc_errors::ErrorGuaranteed; use rustc_hir::def_id::{DefId, LocalDefId}; use rustc_infer::infer::TyCtxtInferExt; use rustc_middle::ty::subst::SubstsRef; @@ -114,7 +114,7 @@ impl<'tcx> TypeVisitor<'tcx> for BoundVarsCollector<'tcx> { fn resolve_instance<'tcx>( tcx: TyCtxt<'tcx>, key: ty::ParamEnvAnd<'tcx, (DefId, SubstsRef<'tcx>)>, -) -> Result>, ErrorReported> { +) -> Result>, ErrorGuaranteed> { let (param_env, (did, substs)) = key.into_parts(); if let Some(did) = did.as_local() { if let Some(param_did) = tcx.opt_const_param_of(did) { @@ -128,7 +128,7 @@ fn resolve_instance<'tcx>( fn resolve_instance_of_const_arg<'tcx>( tcx: TyCtxt<'tcx>, key: ty::ParamEnvAnd<'tcx, (LocalDefId, DefId, SubstsRef<'tcx>)>, -) -> Result>, ErrorReported> { +) -> Result>, ErrorGuaranteed> { let (param_env, (did, const_param_did, substs)) = key.into_parts(); inner_resolve_instance( tcx, @@ -143,7 +143,7 @@ fn resolve_instance_of_const_arg<'tcx>( fn inner_resolve_instance<'tcx>( tcx: TyCtxt<'tcx>, key: ty::ParamEnvAnd<'tcx, (ty::WithOptConstParam, SubstsRef<'tcx>)>, -) -> Result>, ErrorReported> { +) -> Result>, ErrorGuaranteed> { let (param_env, (def, substs)) = key.into_parts(); let result = if let Some(trait_def_id) = tcx.trait_of_item(def.did) { @@ -203,7 +203,7 @@ fn resolve_associated_item<'tcx>( param_env: ty::ParamEnv<'tcx>, trait_id: DefId, rcvr_substs: SubstsRef<'tcx>, -) -> Result>, ErrorReported> { +) -> Result>, ErrorGuaranteed> { debug!(?trait_item_id, ?param_env, ?trait_id, ?rcvr_substs, "resolve_associated_item"); let trait_ref = ty::TraitRef::from_method(tcx, trait_id, rcvr_substs); @@ -281,7 +281,7 @@ fn resolve_associated_item<'tcx>( // we know the error would've been caught (e.g. in an upstream crate). // // A better approach might be to just introduce a query (returning - // `Result<(), ErrorReported>`) for the check that `rustc_typeck` + // `Result<(), ErrorGuaranteed>`) for the check that `rustc_typeck` // performs (i.e. that the definition's type in the `impl` matches // the declaration in the `trait`), so that we can cheaply check // here if it failed, instead of approximating it. @@ -308,7 +308,7 @@ fn resolve_associated_item<'tcx>( let span = tcx.def_span(leaf_def.item.def_id); tcx.sess.delay_span_bug(span, &msg); - return Err(ErrorReported); + return Err(ErrorGuaranteed); } } -- cgit 1.4.1-3-g733a5