Replace TyCtxt::emit_node_span_lint with emit_diag_node_span_lint

This commit is contained in:
Guillaume Gomez
2026-02-24 15:47:11 +01:00
parent 1c6c0f7316
commit 2bb3b01af2
43 changed files with 123 additions and 145 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ pub(crate) fn lint_nonexhaustive_missing_variants<'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_diag_node_span_lint(
rcx.tcx.emit_node_span_lint(
NON_EXHAUSTIVE_OMITTED_PATTERNS,
rcx.match_lint_level,
rcx.scrut_span,
+3 -3
View File
@@ -948,7 +948,7 @@ fn lint_overlapping_range_endpoints(
.map(|span| errors::Overlap { range: overlap_as_pat.to_string(), span })
.collect();
let pat_span = pat.data().span;
self.tcx.emit_diag_node_span_lint(
self.tcx.emit_node_span_lint(
lint::builtin::OVERLAPPING_RANGE_ENDPOINTS,
self.match_lint_level,
pat_span,
@@ -984,7 +984,7 @@ fn lint_non_contiguous_range_endpoints(
let gap_as_pat = self.print_pat_range(&gap, *pat.ty());
if gapped_with.is_empty() {
// If `gapped_with` is empty, `gap == T::MAX`.
self.tcx.emit_diag_node_span_lint(
self.tcx.emit_node_span_lint(
lint::builtin::NON_CONTIGUOUS_RANGE_ENDPOINTS,
self.match_lint_level,
thir_pat.span,
@@ -998,7 +998,7 @@ fn lint_non_contiguous_range_endpoints(
},
);
} else {
self.tcx.emit_diag_node_span_lint(
self.tcx.emit_node_span_lint(
lint::builtin::NON_CONTIGUOUS_RANGE_ENDPOINTS,
self.match_lint_level,
thir_pat.span,