Rename struct_span_err!
as struct_span_code_err!
.
Because it takes an error code after the span. This avoids the confusing overlap with the `DiagCtxt::struct_span_err` method, which doesn't take an error code.
This commit is contained in:
parent
99b1b0f85c
commit
4864cb8aef
46 changed files with 277 additions and 224 deletions
|
@ -12,7 +12,7 @@ use crate::constrained_generic_params as cgp;
|
|||
use min_specialization::check_min_specialization;
|
||||
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_errors::struct_span_err;
|
||||
use rustc_errors::struct_span_code_err;
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_hir::def_id::{LocalDefId, LocalModDefId};
|
||||
use rustc_middle::query::Providers;
|
||||
|
@ -170,7 +170,7 @@ fn enforce_impl_params_are_constrained(tcx: TyCtxt<'_>, impl_def_id: LocalDefId)
|
|||
}
|
||||
|
||||
fn report_unused_parameter(tcx: TyCtxt<'_>, span: Span, kind: &str, name: Symbol) {
|
||||
let mut err = struct_span_err!(
|
||||
let mut err = struct_span_code_err!(
|
||||
tcx.dcx(),
|
||||
span,
|
||||
E0207,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue