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
|
@ -6,7 +6,7 @@ use super::{PatCtxt, PatternError};
|
|||
|
||||
use rustc_arena::TypedArena;
|
||||
use rustc_ast::Mutability;
|
||||
use rustc_errors::{error_code, struct_span_err, Applicability, DiagnosticBuilder};
|
||||
use rustc_errors::{error_code, struct_span_err, Applicability, Diagnostic, DiagnosticBuilder};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def::*;
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
@ -281,12 +281,7 @@ impl<'p, 'tcx> MatchVisitor<'_, 'p, 'tcx> {
|
|||
|
||||
/// A path pattern was interpreted as a constant, not a new variable.
|
||||
/// This caused an irrefutable match failure in e.g. `let`.
|
||||
fn const_not_var(
|
||||
err: &mut DiagnosticBuilder<'_>,
|
||||
tcx: TyCtxt<'_>,
|
||||
pat: &Pat<'_>,
|
||||
path: &hir::Path<'_>,
|
||||
) {
|
||||
fn const_not_var(err: &mut Diagnostic, tcx: TyCtxt<'_>, pat: &Pat<'_>, path: &hir::Path<'_>) {
|
||||
let descr = path.res.descr();
|
||||
err.span_label(
|
||||
pat.span,
|
||||
|
@ -594,7 +589,7 @@ crate fn pattern_not_covered_label(
|
|||
/// Point at the definition of non-covered `enum` variants.
|
||||
fn adt_defined_here<'p, 'tcx>(
|
||||
cx: &MatchCheckCtxt<'p, 'tcx>,
|
||||
err: &mut DiagnosticBuilder<'_>,
|
||||
err: &mut Diagnostic,
|
||||
ty: Ty<'tcx>,
|
||||
witnesses: &[DeconstructedPat<'p, 'tcx>],
|
||||
) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue