about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-01-23 00:06:57 +0000
committerbors <bors@rust-lang.org>2024-01-23 00:06:57 +0000
commit0011fac90d2846ea3c04506238ff6e4ed3ce0efe (patch)
tree790800883bc3195caaaa042ec32f3c0d2f6420ef /compiler/rustc_pattern_analysis/src
parentd6b151fc77e213bf637db0f12c1965ace3ffe255 (diff)
parent15a4c4fc6f1bda15bbc6c40395ff709d1b7fd166 (diff)
downloadrust-0011fac90d2846ea3c04506238ff6e4ed3ce0efe.tar.gz
rust-0011fac90d2846ea3c04506238ff6e4ed3ce0efe.zip
Auto merge of #120017 - nnethercote:lint-api, r=oli-obk
Fix naming in the lint API

Methods for emit lints are named very inconsistently. This PR fixes that up.

r? `@compiler-errors`
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
-rw-r--r--compiler/rustc_pattern_analysis/src/lints.rs2
-rw-r--r--compiler/rustc_pattern_analysis/src/rustc.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_pattern_analysis/src/lints.rs b/compiler/rustc_pattern_analysis/src/lints.rs
index f9f065fbe8b..4bfe7dfb072 100644
--- a/compiler/rustc_pattern_analysis/src/lints.rs
+++ b/compiler/rustc_pattern_analysis/src/lints.rs
@@ -158,7 +158,7 @@ pub(crate) fn lint_nonexhaustive_missing_variants<'a, 'p, 'tcx>(
             // is not exhaustive enough.
             //
             // NB: The partner lint for structs lives in `compiler/rustc_hir_analysis/src/check/pat.rs`.
-            rcx.tcx.emit_spanned_lint(
+            rcx.tcx.emit_node_span_lint(
                 NON_EXHAUSTIVE_OMITTED_PATTERNS,
                 rcx.match_lint_level,
                 rcx.scrut_span,
diff --git a/compiler/rustc_pattern_analysis/src/rustc.rs b/compiler/rustc_pattern_analysis/src/rustc.rs
index 27b25802427..d8c3c010a2a 100644
--- a/compiler/rustc_pattern_analysis/src/rustc.rs
+++ b/compiler/rustc_pattern_analysis/src/rustc.rs
@@ -1001,7 +1001,7 @@ impl<'p, 'tcx> TypeCx for RustcMatchCheckCtxt<'p, 'tcx> {
             .map(|span| errors::Overlap { range: overlap_as_pat.clone(), span })
             .collect();
         let pat_span = pat.data().unwrap().span;
-        self.tcx.emit_spanned_lint(
+        self.tcx.emit_node_span_lint(
             lint::builtin::OVERLAPPING_RANGE_ENDPOINTS,
             self.match_lint_level,
             pat_span,