mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Replace TyCtxt::emit_node_span_lint with emit_diag_node_span_lint
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user