1
Fork 0

rename ErrorReported -> ErrorGuaranteed

This commit is contained in:
mark 2022-01-23 12:34:26 -06:00
parent c42d846add
commit e489a94dee
112 changed files with 580 additions and 559 deletions

View file

@ -3,7 +3,9 @@ use std::ptr;
use rustc_ast::{self as ast, Path};
use rustc_ast_pretty::pprust;
use rustc_data_structures::fx::FxHashSet;
use rustc_errors::{struct_span_err, Applicability, Diagnostic, DiagnosticBuilder, ErrorReported};
use rustc_errors::{
struct_span_err, Applicability, Diagnostic, DiagnosticBuilder, ErrorGuaranteed,
};
use rustc_feature::BUILTIN_ATTRIBUTES;
use rustc_hir::def::Namespace::{self, *};
use rustc_hir::def::{self, CtorKind, CtorOf, DefKind, NonMacroAttrKind};
@ -110,7 +112,7 @@ impl<'a> Resolver<'a> {
&self,
span: Span,
resolution_error: ResolutionError<'_>,
) -> DiagnosticBuilder<'_, ErrorReported> {
) -> DiagnosticBuilder<'_, ErrorGuaranteed> {
match resolution_error {
ResolutionError::GenericParamsFromOuterFunction(outer_res, has_generic_params) => {
let mut err = struct_span_err!(
@ -627,7 +629,7 @@ impl<'a> Resolver<'a> {
crate fn report_vis_error(
&self,
vis_resolution_error: VisResolutionError<'_>,
) -> ErrorReported {
) -> ErrorGuaranteed {
match vis_resolution_error {
VisResolutionError::Relative2018(span, path) => {
let mut err = self.session.struct_span_err(

View file

@ -13,7 +13,7 @@ use rustc_ast::{
use rustc_ast_pretty::pprust::path_segment_to_string;
use rustc_data_structures::fx::FxHashSet;
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::Namespace::{self, *};
@ -135,7 +135,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
span: Span,
source: PathSource<'_>,
res: Option<Res>,
) -> (DiagnosticBuilder<'a, ErrorReported>, Vec<ImportSuggestion>) {
) -> (DiagnosticBuilder<'a, ErrorGuaranteed>, Vec<ImportSuggestion>) {
let ident_span = path.last().map_or(span, |ident| ident.ident.span);
let ns = source.namespace();
let is_expected = &|res| source.is_expected(res);
@ -1819,7 +1819,7 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
&self,
spans: Vec<Span>,
count: usize,
) -> DiagnosticBuilder<'tcx, ErrorReported> {
) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> {
struct_span_err!(
self.tcx.sess,
spans,

View file

@ -40,7 +40,9 @@ use rustc_ast_pretty::pprust;
use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap};
use rustc_data_structures::intern::Interned;
use rustc_data_structures::sync::Lrc;
use rustc_errors::{struct_span_err, Applicability, Diagnostic, DiagnosticBuilder, ErrorReported};
use rustc_errors::{
struct_span_err, Applicability, Diagnostic, DiagnosticBuilder, ErrorGuaranteed,
};
use rustc_expand::base::{DeriveResolutions, SyntaxExtension, SyntaxExtensionKind};
use rustc_hir::def::Namespace::*;
use rustc_hir::def::{self, CtorOf, DefKind, NonMacroAttrKind, PartialRes};
@ -713,7 +715,7 @@ struct PrivacyError<'a> {
}
struct UseError<'a> {
err: DiagnosticBuilder<'a, ErrorReported>,
err: DiagnosticBuilder<'a, ErrorGuaranteed>,
/// Candidates which user could `use` to access the missing type.
candidates: Vec<ImportSuggestion>,
/// The `DefId` of the module to place the use-statements in.