Replace &mut DiagnosticBuilder
, in signatures, with &mut Diagnostic
.
This commit is contained in:
parent
f24ff1815f
commit
02ff9e0aef
65 changed files with 369 additions and 466 deletions
|
@ -17,7 +17,7 @@ use rustc_ast::{self as ast, AttrStyle, AttrVec, CaptureBy, ExprField, Lit, UnOp
|
|||
use rustc_ast::{AnonConst, BinOp, BinOpKind, FnDecl, FnRetTy, MacCall, Param, Ty, TyKind};
|
||||
use rustc_ast::{Arm, Async, BlockCheckMode, Expr, ExprKind, Label, Movability, RangeLimits};
|
||||
use rustc_ast_pretty::pprust;
|
||||
use rustc_errors::{Applicability, DiagnosticBuilder, PResult};
|
||||
use rustc_errors::{Applicability, Diagnostic, DiagnosticBuilder, PResult};
|
||||
use rustc_session::lint::builtin::BREAK_WITH_LABEL_AND_LOOP;
|
||||
use rustc_session::lint::BuiltinLintDiagnostics;
|
||||
use rustc_span::edition::LATEST_STABLE_EDITION;
|
||||
|
@ -2653,7 +2653,7 @@ impl<'a> Parser<'a> {
|
|||
let mut base = ast::StructRest::None;
|
||||
let mut recover_async = false;
|
||||
|
||||
let mut async_block_err = |e: &mut DiagnosticBuilder<'_>, span: Span| {
|
||||
let mut async_block_err = |e: &mut Diagnostic, span: Span| {
|
||||
recover_async = true;
|
||||
e.span_label(span, "`async` blocks are only allowed in Rust 2018 or later");
|
||||
e.help(&format!("set `edition = \"{}\"` in `Cargo.toml`", LATEST_STABLE_EDITION));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue