rename ErrorReported -> ErrorGuaranteed
This commit is contained in:
@@ -10,7 +10,7 @@ use rustc_ast::{self as ast, AstLike, Attribute, Item, NodeId, PatKind};
|
||||
use rustc_attr::{self as attr, Deprecation, Stability};
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_data_structures::sync::{self, Lrc};
|
||||
use rustc_errors::{Applicability, DiagnosticBuilder, ErrorReported, PResult};
|
||||
use rustc_errors::{Applicability, DiagnosticBuilder, ErrorGuaranteed, PResult};
|
||||
use rustc_lint_defs::builtin::PROC_MACRO_BACK_COMPAT;
|
||||
use rustc_lint_defs::BuiltinLintDiagnostics;
|
||||
use rustc_parse::{self, nt_to_tokenstream, parser, MACRO_ARGUMENTS};
|
||||
@@ -275,7 +275,7 @@ pub trait ProcMacro {
|
||||
ecx: &'cx mut ExtCtxt<'_>,
|
||||
span: Span,
|
||||
ts: TokenStream,
|
||||
) -> Result<TokenStream, ErrorReported>;
|
||||
) -> Result<TokenStream, ErrorGuaranteed>;
|
||||
}
|
||||
|
||||
impl<F> ProcMacro for F
|
||||
@@ -287,7 +287,7 @@ where
|
||||
_ecx: &'cx mut ExtCtxt<'_>,
|
||||
_span: Span,
|
||||
ts: TokenStream,
|
||||
) -> Result<TokenStream, ErrorReported> {
|
||||
) -> Result<TokenStream, ErrorGuaranteed> {
|
||||
// FIXME setup implicit context in TLS before calling self.
|
||||
Ok(self(ts))
|
||||
}
|
||||
@@ -300,7 +300,7 @@ pub trait AttrProcMacro {
|
||||
span: Span,
|
||||
annotation: TokenStream,
|
||||
annotated: TokenStream,
|
||||
) -> Result<TokenStream, ErrorReported>;
|
||||
) -> Result<TokenStream, ErrorGuaranteed>;
|
||||
}
|
||||
|
||||
impl<F> AttrProcMacro for F
|
||||
@@ -313,7 +313,7 @@ where
|
||||
_span: Span,
|
||||
annotation: TokenStream,
|
||||
annotated: TokenStream,
|
||||
) -> Result<TokenStream, ErrorReported> {
|
||||
) -> Result<TokenStream, ErrorGuaranteed> {
|
||||
// FIXME setup implicit context in TLS before calling self.
|
||||
Ok(self(annotation, annotated))
|
||||
}
|
||||
@@ -1076,7 +1076,7 @@ impl<'a> ExtCtxt<'a> {
|
||||
&self,
|
||||
sp: S,
|
||||
msg: &str,
|
||||
) -> DiagnosticBuilder<'a, ErrorReported> {
|
||||
) -> DiagnosticBuilder<'a, ErrorGuaranteed> {
|
||||
self.sess.parse_sess.span_diagnostic.struct_span_err(sp, msg)
|
||||
}
|
||||
|
||||
@@ -1174,7 +1174,7 @@ pub fn expr_to_spanned_string<'a>(
|
||||
cx: &'a mut ExtCtxt<'_>,
|
||||
expr: P<ast::Expr>,
|
||||
err_msg: &str,
|
||||
) -> Result<(Symbol, ast::StrStyle, Span), Option<(DiagnosticBuilder<'a, ErrorReported>, bool)>> {
|
||||
) -> Result<(Symbol, ast::StrStyle, Span), Option<(DiagnosticBuilder<'a, ErrorGuaranteed>, bool)>> {
|
||||
// Perform eager expansion on the expression.
|
||||
// We want to be able to handle e.g., `concat!("foo", "bar")`.
|
||||
let expr = cx.expander().fully_expand_fragment(AstFragment::Expr(expr)).make_expr();
|
||||
|
||||
Reference in New Issue
Block a user