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
|
@ -7,7 +7,7 @@ use rustc_ast::node_id::NodeId;
|
|||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_data_structures::sync::{Lock, Lrc};
|
||||
use rustc_errors::{emitter::SilentEmitter, ColorConfig, Handler};
|
||||
use rustc_errors::{error_code, Applicability, DiagnosticBuilder};
|
||||
use rustc_errors::{error_code, Applicability, Diagnostic, DiagnosticBuilder};
|
||||
use rustc_feature::{find_feature_issue, GateIssue, UnstableFeatures};
|
||||
use rustc_span::edition::Edition;
|
||||
use rustc_span::hygiene::ExpnId;
|
||||
|
@ -243,7 +243,7 @@ impl ParseSess {
|
|||
|
||||
/// Extend an error with a suggestion to wrap an expression with parentheses to allow the
|
||||
/// parser to continue parsing the following operation as part of the same expression.
|
||||
pub fn expr_parentheses_needed(&self, err: &mut DiagnosticBuilder<'_>, span: Span) {
|
||||
pub fn expr_parentheses_needed(&self, err: &mut Diagnostic, span: Span) {
|
||||
err.multipart_suggestion(
|
||||
"parentheses are required to parse this as an expression",
|
||||
vec![(span.shrink_to_lo(), "(".to_string()), (span.shrink_to_hi(), ")".to_string())],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue