Rename TyCtxt::emit_spanned_lint
as TyCtxt::emit_node_span_lint
.
This commit is contained in:
parent
82ca070c16
commit
e164cf30f8
32 changed files with 118 additions and 118 deletions
|
@ -1285,7 +1285,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
|
|||
// that we do not emit the same warning twice if the uninhabited type
|
||||
// is indeed `!`.
|
||||
|
||||
self.ir.tcx.emit_spanned_lint(
|
||||
self.ir.tcx.emit_node_span_lint(
|
||||
lint::builtin::UNREACHABLE_CODE,
|
||||
expr_id,
|
||||
expr_span,
|
||||
|
@ -1446,7 +1446,7 @@ impl<'tcx> Liveness<'_, 'tcx> {
|
|||
if self.used_on_entry(entry_ln, var) {
|
||||
if !self.live_on_entry(entry_ln, var) {
|
||||
if let Some(name) = self.should_warn(var) {
|
||||
self.ir.tcx.emit_spanned_lint(
|
||||
self.ir.tcx.emit_node_span_lint(
|
||||
lint::builtin::UNUSED_ASSIGNMENTS,
|
||||
var_hir_id,
|
||||
vec![span],
|
||||
|
@ -1456,7 +1456,7 @@ impl<'tcx> Liveness<'_, 'tcx> {
|
|||
}
|
||||
} else {
|
||||
if let Some(name) = self.should_warn(var) {
|
||||
self.ir.tcx.emit_spanned_lint(
|
||||
self.ir.tcx.emit_node_span_lint(
|
||||
lint::builtin::UNUSED_VARIABLES,
|
||||
var_hir_id,
|
||||
vec![span],
|
||||
|
@ -1478,7 +1478,7 @@ impl<'tcx> Liveness<'_, 'tcx> {
|
|||
if !self.live_on_entry(ln, var)
|
||||
&& let Some(name) = self.should_warn(var)
|
||||
{
|
||||
self.ir.tcx.emit_spanned_lint(
|
||||
self.ir.tcx.emit_node_span_lint(
|
||||
lint::builtin::UNUSED_ASSIGNMENTS,
|
||||
hir_id,
|
||||
spans,
|
||||
|
@ -1552,7 +1552,7 @@ impl<'tcx> Liveness<'_, 'tcx> {
|
|||
if ln == self.exit_ln { false } else { self.assigned_on_exit(ln, var) };
|
||||
|
||||
if is_assigned {
|
||||
self.ir.tcx.emit_spanned_lint(
|
||||
self.ir.tcx.emit_node_span_lint(
|
||||
lint::builtin::UNUSED_VARIABLES,
|
||||
first_hir_id,
|
||||
hir_ids_and_spans
|
||||
|
@ -1574,7 +1574,7 @@ impl<'tcx> Liveness<'_, 'tcx> {
|
|||
span.with_hi(BytePos(span.hi().0 + 1))
|
||||
})
|
||||
.collect();
|
||||
self.ir.tcx.emit_spanned_lint(
|
||||
self.ir.tcx.emit_node_span_lint(
|
||||
lint::builtin::UNUSED_VARIABLES,
|
||||
first_hir_id,
|
||||
hir_ids_and_spans.iter().map(|(_, pat_span, _)| *pat_span).collect::<Vec<_>>(),
|
||||
|
@ -1599,7 +1599,7 @@ impl<'tcx> Liveness<'_, 'tcx> {
|
|||
let non_shorthands =
|
||||
non_shorthands.into_iter().map(|(_, pat_span, _)| pat_span).collect();
|
||||
|
||||
self.ir.tcx.emit_spanned_lint(
|
||||
self.ir.tcx.emit_node_span_lint(
|
||||
lint::builtin::UNUSED_VARIABLES,
|
||||
first_hir_id,
|
||||
hir_ids_and_spans
|
||||
|
@ -1638,7 +1638,7 @@ impl<'tcx> Liveness<'_, 'tcx> {
|
|||
}
|
||||
};
|
||||
|
||||
self.ir.tcx.emit_spanned_lint(
|
||||
self.ir.tcx.emit_node_span_lint(
|
||||
lint::builtin::UNUSED_VARIABLES,
|
||||
first_hir_id,
|
||||
hir_ids_and_spans
|
||||
|
@ -1690,7 +1690,7 @@ impl<'tcx> Liveness<'_, 'tcx> {
|
|||
if !self.live_on_exit(ln, var)
|
||||
&& let Some(name) = self.should_warn(var)
|
||||
{
|
||||
self.ir.tcx.emit_spanned_lint(
|
||||
self.ir.tcx.emit_node_span_lint(
|
||||
lint::builtin::UNUSED_ASSIGNMENTS,
|
||||
hir_id,
|
||||
spans,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue