diff options
Diffstat (limited to 'compiler/rustc_hir_analysis/src/astconv/generics.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/astconv/generics.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_hir_analysis/src/astconv/generics.rs b/compiler/rustc_hir_analysis/src/astconv/generics.rs index adc6a9de808..e2cd4d5f21c 100644 --- a/compiler/rustc_hir_analysis/src/astconv/generics.rs +++ b/compiler/rustc_hir_analysis/src/astconv/generics.rs @@ -5,7 +5,7 @@ use crate::astconv::{ }; use crate::structured_errors::{GenericArgsInfo, StructuredDiagnostic, WrongNumberOfGenericArgs}; use rustc_ast::ast::ParamKindOrd; -use rustc_errors::{struct_span_err, Applicability, Diagnostic, ErrorGuaranteed, MultiSpan}; +use rustc_errors::{struct_span_code_err, Applicability, Diagnostic, ErrorGuaranteed, MultiSpan}; use rustc_hir as hir; use rustc_hir::def::{DefKind, Res}; use rustc_hir::def_id::DefId; @@ -27,7 +27,7 @@ fn generic_arg_mismatch_err( help: Option<String>, ) -> ErrorGuaranteed { let sess = tcx.sess; - let mut err = struct_span_err!( + let mut err = struct_span_code_err!( tcx.dcx(), arg.span(), E0747, @@ -70,7 +70,7 @@ fn generic_arg_mismatch_err( Res::Err => { add_braces_suggestion(arg, &mut err); return err - .primary_message_mv("unresolved item provided when a constant was expected") + .with_primary_message("unresolved item provided when a constant was expected") .emit(); } Res::Def(DefKind::TyParam, src_def_id) => { @@ -650,8 +650,8 @@ pub(crate) fn prohibit_explicit_late_bound_lifetimes( if position == GenericArgPosition::Value && args.num_lifetime_params() != param_counts.lifetimes { - struct_span_err!(tcx.dcx(), span, E0794, "{}", msg) - .span_note_mv(span_late, note) + struct_span_code_err!(tcx.dcx(), span, E0794, "{}", msg) + .with_span_note(span_late, note) .emit(); } else { let mut multispan = MultiSpan::from_span(span); |
