summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-01-16 16:27:02 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-01-23 08:09:05 +1100
commite164cf30f8f96551cedece4ed199d7ecb5832648 (patch)
tree0dd488e397afda47649c87f00686a58a96e06122 /compiler/rustc_trait_selection/src
parent82ca070c1680004da7d25abcc1d3d793d00abf06 (diff)
downloadrust-e164cf30f8f96551cedece4ed199d7ecb5832648.tar.gz
rust-e164cf30f8f96551cedece4ed199d7ecb5832648.zip
Rename `TyCtxt::emit_spanned_lint` as `TyCtxt::emit_node_span_lint`.
Diffstat (limited to 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs
index 532e2cb36e3..bb1b6ec1390 100644
--- a/compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs
+++ b/compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs
@@ -359,7 +359,7 @@ impl IgnoredDiagnosticOption {
         option_name: &'static str,
     ) {
         if let (Some(new_item), Some(old_item)) = (new, old) {
-            tcx.emit_spanned_lint(
+            tcx.emit_node_span_lint(
                 UNKNOWN_OR_MALFORMED_DIAGNOSTIC_ATTRIBUTES,
                 tcx.local_def_id_to_hir_id(item_def_id.expect_local()),
                 new_item,
@@ -491,7 +491,7 @@ impl<'tcx> OnUnimplementedDirective {
             }
 
             if is_diagnostic_namespace_variant {
-                tcx.emit_spanned_lint(
+                tcx.emit_node_span_lint(
                     UNKNOWN_OR_MALFORMED_DIAGNOSTIC_ATTRIBUTES,
                     tcx.local_def_id_to_hir_id(item_def_id.expect_local()),
                     vec![item.span()],
@@ -629,7 +629,7 @@ impl<'tcx> OnUnimplementedDirective {
                     AttrArgs::Eq(span, AttrArgsEq::Hir(expr)) => span.to(expr.span),
                 };
 
-                tcx.emit_spanned_lint(
+                tcx.emit_node_span_lint(
                     UNKNOWN_OR_MALFORMED_DIAGNOSTIC_ATTRIBUTES,
                     tcx.local_def_id_to_hir_id(item_def_id.expect_local()),
                     report_span,
@@ -640,14 +640,14 @@ impl<'tcx> OnUnimplementedDirective {
         } else if is_diagnostic_namespace_variant {
             match &attr.kind {
                 AttrKind::Normal(p) if !matches!(p.item.args, AttrArgs::Empty) => {
-                    tcx.emit_spanned_lint(
+                    tcx.emit_node_span_lint(
                         UNKNOWN_OR_MALFORMED_DIAGNOSTIC_ATTRIBUTES,
                         tcx.local_def_id_to_hir_id(item_def_id.expect_local()),
                         attr.span,
                         MalformedOnUnimplementedAttrLint::new(attr.span),
                     );
                 }
-                _ => tcx.emit_spanned_lint(
+                _ => tcx.emit_node_span_lint(
                     UNKNOWN_OR_MALFORMED_DIAGNOSTIC_ATTRIBUTES,
                     tcx.local_def_id_to_hir_id(item_def_id.expect_local()),
                     attr.span,
@@ -776,7 +776,7 @@ impl<'tcx> OnUnimplementedFormatString {
                             s if generics.params.iter().any(|param| param.name == s) => (),
                             s => {
                                 if self.is_diagnostic_namespace_variant {
-                                    tcx.emit_spanned_lint(
+                                    tcx.emit_node_span_lint(
                                         UNKNOWN_OR_MALFORMED_DIAGNOSTIC_ATTRIBUTES,
                                         tcx.local_def_id_to_hir_id(item_def_id.expect_local()),
                                         self.span,