diff options
| author | mark <markm@cs.wisc.edu> | 2022-01-23 12:34:26 -0600 |
|---|---|---|
| committer | mark <markm@cs.wisc.edu> | 2022-03-02 09:45:25 -0600 |
| commit | e489a94deef3d41513fe4254804d730f0fd6cbc0 (patch) | |
| tree | d2c3743151e614831817cb8c27487a820826cc29 /compiler/rustc_infer/src | |
| parent | c42d846add941a26bd254911e16f02c4a3f9346f (diff) | |
| download | rust-e489a94deef3d41513fe4254804d730f0fd6cbc0.tar.gz rust-e489a94deef3d41513fe4254804d730f0fd6cbc0.zip | |
rename ErrorReported -> ErrorGuaranteed
Diffstat (limited to 'compiler/rustc_infer/src')
12 files changed, 44 insertions, 44 deletions
diff --git a/compiler/rustc_infer/src/infer/error_reporting/mod.rs b/compiler/rustc_infer/src/infer/error_reporting/mod.rs index 317481a037d..edb2b11c039 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/mod.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/mod.rs @@ -58,7 +58,7 @@ use crate::traits::{ }; use rustc_data_structures::fx::{FxHashMap, FxHashSet}; -use rustc_errors::{pluralize, struct_span_err, Diagnostic, ErrorReported}; +use rustc_errors::{pluralize, struct_span_err, Diagnostic, ErrorGuaranteed}; use rustc_errors::{Applicability, DiagnosticBuilder, DiagnosticStyledString}; use rustc_hir as hir; use rustc_hir::def_id::DefId; @@ -230,7 +230,7 @@ pub fn unexpected_hidden_region_diagnostic<'tcx>( span: Span, hidden_ty: Ty<'tcx>, hidden_region: ty::Region<'tcx>, -) -> DiagnosticBuilder<'tcx, ErrorReported> { +) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { let mut err = struct_span_err!( tcx.sess, span, @@ -258,7 +258,7 @@ pub fn unexpected_hidden_region_diagnostic<'tcx>( // explanation. // // (*) if not, the `tainted_by_errors` field would be set to - // `Some(ErrorReported)` in any case, so we wouldn't be here at all. + // `Some(ErrorGuaranteed)` in any case, so we wouldn't be here at all. explain_free_region( tcx, &mut err, @@ -2013,7 +2013,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { &self, trace: TypeTrace<'tcx>, terr: &TypeError<'tcx>, - ) -> DiagnosticBuilder<'tcx, ErrorReported> { + ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { use crate::traits::ObligationCauseCode::MatchExpressionArm; debug!("report_and_explain_type_error(trace={:?}, terr={:?})", trace, terr); @@ -2221,7 +2221,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { origin: Option<SubregionOrigin<'tcx>>, bound_kind: GenericKind<'tcx>, sub: Region<'tcx>, - ) -> DiagnosticBuilder<'a, ErrorReported> { + ) -> DiagnosticBuilder<'a, ErrorGuaranteed> { let hir = self.tcx.hir(); // Attempt to obtain the span of the parameter so we can // suggest adding an explicit lifetime bound to it. @@ -2647,7 +2647,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { fn report_inference_failure( &self, var_origin: RegionVariableOrigin, - ) -> DiagnosticBuilder<'tcx, ErrorReported> { + ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { let br_string = |br: ty::BoundRegionKind| { let mut s = match br { ty::BrNamed(_, name) => name.to_string(), diff --git a/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs b/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs index 067f19bbe94..8ff0eed71ed 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs @@ -1,7 +1,7 @@ use crate::infer::type_variable::TypeVariableOriginKind; use crate::infer::{InferCtxt, Symbol}; use rustc_errors::{ - pluralize, struct_span_err, Applicability, Diagnostic, DiagnosticBuilder, ErrorReported, + pluralize, struct_span_err, Applicability, Diagnostic, DiagnosticBuilder, ErrorGuaranteed, }; use rustc_hir as hir; use rustc_hir::def::{DefKind, Namespace}; @@ -490,7 +490,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { arg: GenericArg<'tcx>, impl_candidates: Vec<ty::TraitRef<'tcx>>, error_code: TypeAnnotationNeeded, - ) -> DiagnosticBuilder<'tcx, ErrorReported> { + ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { let arg = self.resolve_vars_if_possible(arg); let arg_data = self.extract_inference_diagnostics_data(arg, None); @@ -915,7 +915,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { kind: hir::GeneratorKind, span: Span, ty: Ty<'tcx>, - ) -> DiagnosticBuilder<'tcx, ErrorReported> { + ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { let ty = self.resolve_vars_if_possible(ty); let data = self.extract_inference_diagnostics_data(ty.into(), None); diff --git a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/different_lifetimes.rs b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/different_lifetimes.rs index d7e88d02595..0d6dbd8f343 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/different_lifetimes.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/different_lifetimes.rs @@ -7,7 +7,7 @@ use crate::infer::error_reporting::nice_region_error::NiceRegionError; use crate::infer::lexical_region_resolve::RegionResolutionError; use crate::infer::SubregionOrigin; -use rustc_errors::{struct_span_err, Applicability, Diagnostic, ErrorReported}; +use rustc_errors::{struct_span_err, Applicability, Diagnostic, ErrorGuaranteed}; use rustc_hir as hir; use rustc_hir::{GenericParamKind, Ty}; use rustc_middle::ty::Region; @@ -49,7 +49,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> { /// ``` /// /// It will later be extended to trait objects. - pub(super) fn try_report_anon_anon_conflict(&self) -> Option<ErrorReported> { + pub(super) fn try_report_anon_anon_conflict(&self) -> Option<ErrorGuaranteed> { let (span, sub, sup) = self.regions()?; if let Some(RegionResolutionError::ConcreteFailure( @@ -148,7 +148,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> { self.suggest_adding_lifetime_params(sub, ty_sup, ty_sub, &mut err); err.emit(); - Some(ErrorReported) + Some(ErrorGuaranteed) } fn suggest_adding_lifetime_params( diff --git a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/mismatched_static_lifetime.rs b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/mismatched_static_lifetime.rs index 2bc2f78261d..e0420291aa3 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/mismatched_static_lifetime.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/mismatched_static_lifetime.rs @@ -7,14 +7,14 @@ use crate::infer::lexical_region_resolve::RegionResolutionError; use crate::infer::{SubregionOrigin, TypeTrace}; use crate::traits::ObligationCauseCode; use rustc_data_structures::stable_set::FxHashSet; -use rustc_errors::{Applicability, ErrorReported}; +use rustc_errors::{Applicability, ErrorGuaranteed}; use rustc_hir as hir; use rustc_hir::intravisit::Visitor; use rustc_middle::ty::TypeVisitor; use rustc_span::MultiSpan; impl<'a, 'tcx> NiceRegionError<'a, 'tcx> { - pub(super) fn try_report_mismatched_static_lifetime(&self) -> Option<ErrorReported> { + pub(super) fn try_report_mismatched_static_lifetime(&self) -> Option<ErrorGuaranteed> { let error = self.error.as_ref()?; debug!("try_report_mismatched_static_lifetime {:?}", error); @@ -99,6 +99,6 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> { err.span_note(impl_span, "...does not necessarily outlive the static lifetime introduced by the compatible `impl`"); } err.emit(); - Some(ErrorReported) + Some(ErrorGuaranteed) } } diff --git a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/mod.rs b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/mod.rs index a8b878ae344..c7bfa686c04 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/mod.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/mod.rs @@ -1,7 +1,7 @@ use crate::infer::lexical_region_resolve::RegionResolutionError; use crate::infer::lexical_region_resolve::RegionResolutionError::*; use crate::infer::InferCtxt; -use rustc_errors::{DiagnosticBuilder, ErrorReported}; +use rustc_errors::{DiagnosticBuilder, ErrorGuaranteed}; use rustc_middle::ty::{self, TyCtxt}; use rustc_span::source_map::Span; @@ -46,17 +46,17 @@ impl<'cx, 'tcx> NiceRegionError<'cx, 'tcx> { self.infcx.tcx } - pub fn try_report_from_nll(&self) -> Option<DiagnosticBuilder<'tcx, ErrorReported>> { + pub fn try_report_from_nll(&self) -> Option<DiagnosticBuilder<'tcx, ErrorGuaranteed>> { // Due to the improved diagnostics returned by the MIR borrow checker, only a subset of // the nice region errors are required when running under the MIR borrow checker. self.try_report_named_anon_conflict().or_else(|| self.try_report_placeholder_conflict()) } - pub fn try_report(&self) -> Option<ErrorReported> { + pub fn try_report(&self) -> Option<ErrorGuaranteed> { self.try_report_from_nll() .map(|mut diag| { diag.emit(); - ErrorReported + ErrorGuaranteed }) .or_else(|| self.try_report_impl_not_conforming_to_trait()) .or_else(|| self.try_report_anon_anon_conflict()) diff --git a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/named_anon_conflict.rs b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/named_anon_conflict.rs index 825aadaad9a..3de5273d8c7 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/named_anon_conflict.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/named_anon_conflict.rs @@ -2,7 +2,7 @@ //! where one region is named and the other is anonymous. use crate::infer::error_reporting::nice_region_error::find_anon_type::find_anon_type; use crate::infer::error_reporting::nice_region_error::NiceRegionError; -use rustc_errors::{struct_span_err, Applicability, DiagnosticBuilder, ErrorReported}; +use rustc_errors::{struct_span_err, Applicability, DiagnosticBuilder, ErrorGuaranteed}; use rustc_middle::ty; impl<'a, 'tcx> NiceRegionError<'a, 'tcx> { @@ -10,7 +10,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> { /// an anonymous region, emit an descriptive diagnostic error. pub(super) fn try_report_named_anon_conflict( &self, - ) -> Option<DiagnosticBuilder<'tcx, ErrorReported>> { + ) -> Option<DiagnosticBuilder<'tcx, ErrorGuaranteed>> { let (span, sub, sup) = self.regions()?; debug!( diff --git a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs index 5ce5d44e51d..e2185d86133 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs @@ -4,7 +4,7 @@ use crate::infer::ValuePairs; use crate::infer::{SubregionOrigin, TypeTrace}; use crate::traits::{ObligationCause, ObligationCauseCode}; use rustc_data_structures::intern::Interned; -use rustc_errors::{Diagnostic, DiagnosticBuilder, ErrorReported}; +use rustc_errors::{Diagnostic, DiagnosticBuilder, ErrorGuaranteed}; use rustc_hir::def::Namespace; use rustc_hir::def_id::DefId; use rustc_middle::ty::error::ExpectedFound; @@ -19,7 +19,7 @@ impl<'tcx> NiceRegionError<'_, 'tcx> { /// an anonymous region, emit a descriptive diagnostic error. pub(super) fn try_report_placeholder_conflict( &self, - ) -> Option<DiagnosticBuilder<'tcx, ErrorReported>> { + ) -> Option<DiagnosticBuilder<'tcx, ErrorGuaranteed>> { match &self.error { /////////////////////////////////////////////////////////////////////////// // NB. The ordering of cases in this match is very @@ -155,7 +155,7 @@ impl<'tcx> NiceRegionError<'_, 'tcx> { sub_placeholder: Option<Region<'tcx>>, sup_placeholder: Option<Region<'tcx>>, value_pairs: &ValuePairs<'tcx>, - ) -> Option<DiagnosticBuilder<'tcx, ErrorReported>> { + ) -> Option<DiagnosticBuilder<'tcx, ErrorGuaranteed>> { let (expected_substs, found_substs, trait_def_id) = match value_pairs { ValuePairs::TraitRefs(ExpectedFound { expected, found }) if expected.def_id == found.def_id => @@ -203,7 +203,7 @@ impl<'tcx> NiceRegionError<'_, 'tcx> { trait_def_id: DefId, expected_substs: SubstsRef<'tcx>, actual_substs: SubstsRef<'tcx>, - ) -> DiagnosticBuilder<'tcx, ErrorReported> { + ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { let span = cause.span(self.tcx()); let msg = format!( "implementation of `{}` is not general enough", diff --git a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/static_impl_trait.rs b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/static_impl_trait.rs index 210743d7cef..a6de0c3d9fb 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/static_impl_trait.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/static_impl_trait.rs @@ -5,7 +5,7 @@ use crate::infer::lexical_region_resolve::RegionResolutionError; use crate::infer::{SubregionOrigin, TypeTrace}; use crate::traits::{ObligationCauseCode, UnifyReceiverContext}; use rustc_data_structures::stable_set::FxHashSet; -use rustc_errors::{struct_span_err, Applicability, Diagnostic, ErrorReported}; +use rustc_errors::{struct_span_err, Applicability, Diagnostic, ErrorGuaranteed}; use rustc_hir::def_id::DefId; use rustc_hir::intravisit::{walk_ty, Visitor}; use rustc_hir::{self as hir, GenericBound, Item, ItemKind, Lifetime, LifetimeName, Node, TyKind}; @@ -20,7 +20,7 @@ use std::ops::ControlFlow; impl<'a, 'tcx> NiceRegionError<'a, 'tcx> { /// Print the error message for lifetime errors when the return type is a static `impl Trait`, /// `dyn Trait` or if a method call on a trait object introduces a static requirement. - pub(super) fn try_report_static_impl_trait(&self) -> Option<ErrorReported> { + pub(super) fn try_report_static_impl_trait(&self) -> Option<ErrorGuaranteed> { debug!("try_report_static_impl_trait(error={:?})", self.error); let tcx = self.tcx(); let (var_origin, sub_origin, sub_r, sup_origin, sup_r, spans) = match self.error.as_ref()? { @@ -85,7 +85,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> { ); if self.find_impl_on_dyn_trait(&mut err, param.param_ty, &ctxt) { err.emit(); - return Some(ErrorReported); + return Some(ErrorGuaranteed); } else { err.cancel(); } @@ -280,7 +280,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> { ); err.emit(); - Some(ErrorReported) + Some(ErrorGuaranteed) } } diff --git a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/trait_impl_difference.rs b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/trait_impl_difference.rs index 9216fa3ca1d..673c112163e 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/trait_impl_difference.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/trait_impl_difference.rs @@ -4,7 +4,7 @@ use crate::infer::error_reporting::nice_region_error::NiceRegionError; use crate::infer::lexical_region_resolve::RegionResolutionError; use crate::infer::{SubregionOrigin, Subtype}; use crate::traits::ObligationCauseCode::CompareImplMethodObligation; -use rustc_errors::ErrorReported; +use rustc_errors::ErrorGuaranteed; use rustc_hir as hir; use rustc_hir::def::Res; use rustc_hir::def_id::DefId; @@ -19,7 +19,7 @@ use std::ops::ControlFlow; impl<'a, 'tcx> NiceRegionError<'a, 'tcx> { /// Print the error message for lifetime errors when the `impl` doesn't conform to the `trait`. - pub(super) fn try_report_impl_not_conforming_to_trait(&self) -> Option<ErrorReported> { + pub(super) fn try_report_impl_not_conforming_to_trait(&self) -> Option<ErrorGuaranteed> { let error = self.error.as_ref()?; debug!("try_report_impl_not_conforming_to_trait {:?}", error); if let RegionResolutionError::SubSupConflict( @@ -46,7 +46,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> { *sub_found, *trait_item_def_id, ); - return Some(ErrorReported); + return Some(ErrorGuaranteed); } } } @@ -66,7 +66,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> { impl_item_def_id, trait_item_def_id, ); - return Some(ErrorReported); + return Some(ErrorGuaranteed); } } None diff --git a/compiler/rustc_infer/src/infer/error_reporting/note.rs b/compiler/rustc_infer/src/infer/error_reporting/note.rs index 5dc8c894608..e6c8dc302b6 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/note.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/note.rs @@ -1,6 +1,6 @@ use crate::infer::error_reporting::{note_and_explain_region, ObligationCauseExt}; use crate::infer::{self, InferCtxt, SubregionOrigin}; -use rustc_errors::{struct_span_err, Diagnostic, DiagnosticBuilder, ErrorReported}; +use rustc_errors::{struct_span_err, Diagnostic, DiagnosticBuilder, ErrorGuaranteed}; use rustc_middle::traits::ObligationCauseCode; use rustc_middle::ty::error::TypeError; use rustc_middle::ty::{self, Region}; @@ -109,7 +109,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { origin: SubregionOrigin<'tcx>, sub: Region<'tcx>, sup: Region<'tcx>, - ) -> DiagnosticBuilder<'tcx, ErrorReported> { + ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { match origin { infer::Subtype(box trace) => { let terr = TypeError::RegionsDoesNotOutlive(sup, sub); @@ -401,7 +401,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { placeholder_origin: SubregionOrigin<'tcx>, sub: Region<'tcx>, sup: Region<'tcx>, - ) -> DiagnosticBuilder<'tcx, ErrorReported> { + ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { // I can't think how to do better than this right now. -nikomatsakis debug!(?placeholder_origin, ?sub, ?sup, "report_placeholder_failure"); match placeholder_origin { diff --git a/compiler/rustc_infer/src/infer/mod.rs b/compiler/rustc_infer/src/infer/mod.rs index 95608f413d5..5697e73f73a 100644 --- a/compiler/rustc_infer/src/infer/mod.rs +++ b/compiler/rustc_infer/src/infer/mod.rs @@ -14,7 +14,7 @@ use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_data_structures::sync::Lrc; use rustc_data_structures::undo_log::Rollback; use rustc_data_structures::unify as ut; -use rustc_errors::{DiagnosticBuilder, ErrorReported}; +use rustc_errors::{DiagnosticBuilder, ErrorGuaranteed}; use rustc_hir as hir; use rustc_hir::def_id::{DefId, LocalDefId}; use rustc_middle::infer::canonical::{Canonical, CanonicalVarValues}; @@ -1475,9 +1475,9 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { sp: Span, mk_diag: M, actual_ty: Ty<'tcx>, - ) -> DiagnosticBuilder<'tcx, ErrorReported> + ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> where - M: FnOnce(String) -> DiagnosticBuilder<'tcx, ErrorReported>, + M: FnOnce(String) -> DiagnosticBuilder<'tcx, ErrorGuaranteed>, { let actual_ty = self.resolve_vars_if_possible(actual_ty); debug!("type_error_struct_with_diag({:?}, {:?})", sp, actual_ty); @@ -1498,7 +1498,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { expected: Ty<'tcx>, actual: Ty<'tcx>, err: TypeError<'tcx>, - ) -> DiagnosticBuilder<'tcx, ErrorReported> { + ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { let trace = TypeTrace::types(cause, true, expected, actual); self.report_and_explain_type_error(trace, &err) } @@ -1509,7 +1509,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { expected: ty::Const<'tcx>, actual: ty::Const<'tcx>, err: TypeError<'tcx>, - ) -> DiagnosticBuilder<'tcx, ErrorReported> { + ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { let trace = TypeTrace::consts(cause, true, expected, actual); self.report_and_explain_type_error(trace, &err) } diff --git a/compiler/rustc_infer/src/traits/error_reporting/mod.rs b/compiler/rustc_infer/src/traits/error_reporting/mod.rs index 35430849290..5e93c002168 100644 --- a/compiler/rustc_infer/src/traits/error_reporting/mod.rs +++ b/compiler/rustc_infer/src/traits/error_reporting/mod.rs @@ -2,7 +2,7 @@ use super::ObjectSafetyViolation; use crate::infer::InferCtxt; use rustc_data_structures::fx::FxHashSet; -use rustc_errors::{struct_span_err, DiagnosticBuilder, ErrorReported}; +use rustc_errors::{struct_span_err, DiagnosticBuilder, ErrorGuaranteed}; use rustc_hir as hir; use rustc_hir::def_id::DefId; use rustc_middle::ty::TyCtxt; @@ -17,7 +17,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { impl_item_def_id: DefId, trait_item_def_id: DefId, requirement: &dyn fmt::Display, - ) -> DiagnosticBuilder<'tcx, ErrorReported> { + ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { let msg = "impl has stricter requirements than trait"; let sp = self.tcx.sess.source_map().guess_head_span(error_span); @@ -40,7 +40,7 @@ pub fn report_object_safety_error<'tcx>( span: Span, trait_def_id: DefId, violations: &[ObjectSafetyViolation], -) -> DiagnosticBuilder<'tcx, ErrorReported> { +) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { let trait_str = tcx.def_path_str(trait_def_id); let trait_span = tcx.hir().get_if_local(trait_def_id).and_then(|node| match node { hir::Node::Item(item) => Some(item.ident.span), |
