about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-02-28 02:43:12 +0000
committerMichael Goulet <michael@errs.io>2025-03-04 18:04:07 +0000
commit05a80608b36f71f49e6cc8d586f54c023264ac12 (patch)
tree44aabd80068abc07e319cec697ce0f9de9e78f4e /compiler/rustc_hir_analysis/src
parent3d62b279ddc2095b94aa5921540b27f3003365ff (diff)
downloadrust-05a80608b36f71f49e6cc8d586f54c023264ac12.tar.gz
rust-05a80608b36f71f49e6cc8d586f54c023264ac12.zip
Make rustdoc tests use always applicable negative auto impls
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
-rw-r--r--compiler/rustc_hir_analysis/src/check/always_applicable.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/always_applicable.rs b/compiler/rustc_hir_analysis/src/check/always_applicable.rs
index 64377ffa347..ba5b61d3fce 100644
--- a/compiler/rustc_hir_analysis/src/check/always_applicable.rs
+++ b/compiler/rustc_hir_analysis/src/check/always_applicable.rs
@@ -140,7 +140,7 @@ fn ensure_impl_params_and_item_params_correspond<'tcx>(
         return Ok(());
     };
 
-    let drop_impl_span = tcx.def_span(impl_def_id);
+    let impl_span = tcx.def_span(impl_def_id);
     let item_span = tcx.def_span(adt_def_id);
     let self_descr = tcx.def_descr(adt_def_id);
     let polarity = match tcx.impl_polarity(impl_def_id) {
@@ -151,7 +151,7 @@ fn ensure_impl_params_and_item_params_correspond<'tcx>(
         .item_name(tcx.trait_id_of_impl(impl_def_id.to_def_id()).expect("expected impl of trait"));
     let mut err = struct_span_code_err!(
         tcx.dcx(),
-        drop_impl_span,
+        impl_span,
         E0366,
         "`{polarity}{trait_name}` impls cannot be specialized",
     );