diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-01-04 09:08:36 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-01-10 07:33:04 +1100 |
| commit | 4864cb8aefc1e5234d841289b7d8e455041085a6 (patch) | |
| tree | 7db3813a0851d1754456eff832779eec42ba0e9e /compiler/rustc_hir_analysis/src/impl_wf_check.rs | |
| parent | 99b1b0f85c876880cd4da86fee3761e4d09d9463 (diff) | |
| download | rust-4864cb8aefc1e5234d841289b7d8e455041085a6.tar.gz rust-4864cb8aefc1e5234d841289b7d8e455041085a6.zip | |
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.
Diffstat (limited to 'compiler/rustc_hir_analysis/src/impl_wf_check.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/impl_wf_check.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_hir_analysis/src/impl_wf_check.rs b/compiler/rustc_hir_analysis/src/impl_wf_check.rs index ff5fff9363f..3f9b1f384d7 100644 --- a/compiler/rustc_hir_analysis/src/impl_wf_check.rs +++ b/compiler/rustc_hir_analysis/src/impl_wf_check.rs @@ -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, |
