Skip to content

Commit e164cf3

Browse files
committed
Rename TyCtxt::emit_spanned_lint as TyCtxt::emit_node_span_lint.
1 parent 82ca070 commit e164cf3

File tree

32 files changed

+118
-118
lines changed

32 files changed

+118
-118
lines changed

compiler/rustc_borrowck/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ fn do_mir_borrowck<'tcx>(
415415

416416
let mut_span = tcx.sess.source_map().span_until_non_whitespace(span);
417417

418-
tcx.emit_spanned_lint(UNUSED_MUT, lint_root, span, VarNeedNotMut { span: mut_span })
418+
tcx.emit_node_span_lint(UNUSED_MUT, lint_root, span, VarNeedNotMut { span: mut_span })
419419
}
420420

421421
let tainted_by_errors = mbcx.emit_errors();

compiler/rustc_const_eval/src/const_eval/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ pub(super) fn lint<'tcx, 'mir, L>(
175175
{
176176
let (span, frames) = get_span_and_frames(tcx, machine);
177177

178-
tcx.emit_spanned_lint(
178+
tcx.emit_node_span_lint(
179179
lint,
180180
// We use the root frame for this so the crate that defines the const defines whether the
181181
// lint is emitted.

compiler/rustc_const_eval/src/const_eval/machine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir,
611611
.0
612612
.is_error();
613613
let span = ecx.cur_span();
614-
ecx.tcx.emit_spanned_lint(
614+
ecx.tcx.emit_node_span_lint(
615615
rustc_session::lint::builtin::LONG_RUNNING_CONST_EVAL,
616616
hir_id,
617617
span,

compiler/rustc_hir_analysis/src/astconv/object_safety.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
220220
let def_id = projection_bound.projection_def_id();
221221
def_ids.remove(&def_id);
222222
if tcx.generics_require_sized_self(def_id) {
223-
tcx.emit_spanned_lint(
223+
tcx.emit_node_span_lint(
224224
UNUSED_ASSOCIATED_TYPE_BOUNDS,
225225
hir_id,
226226
*span,

compiler/rustc_hir_analysis/src/check/compare_impl_item/refine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ fn report_mismatched_rpitit_signature<'tcx>(
283283
});
284284

285285
let span = unmatched_bound.unwrap_or(span);
286-
tcx.emit_spanned_lint(
286+
tcx.emit_node_span_lint(
287287
REFINING_IMPL_TRAIT,
288288
tcx.local_def_id_to_hir_id(impl_m_def_id.expect_local()),
289289
span,

compiler/rustc_hir_analysis/src/check/errs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ fn handle_static_mut_ref(
8888
"shared ",
8989
)
9090
};
91-
tcx.emit_spanned_lint(
91+
tcx.emit_node_span_lint(
9292
STATIC_MUT_REF,
9393
hir_id,
9494
span,

compiler/rustc_hir_typeck/src/cast.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
587587
};
588588
let expr_ty = fcx.resolve_vars_if_possible(self.expr_ty);
589589
let cast_ty = fcx.resolve_vars_if_possible(self.cast_ty);
590-
fcx.tcx.emit_spanned_lint(
590+
fcx.tcx.emit_node_span_lint(
591591
lint,
592592
self.expr.hir_id,
593593
self.span,
@@ -900,7 +900,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
900900
let expr_ty = fcx.resolve_vars_if_possible(self.expr_ty);
901901
let cast_ty = fcx.resolve_vars_if_possible(self.cast_ty);
902902

903-
fcx.tcx.emit_spanned_lint(
903+
fcx.tcx.emit_node_span_lint(
904904
lint::builtin::CENUM_IMPL_DROP_CAST,
905905
self.expr.hir_id,
906906
self.span,
@@ -934,7 +934,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
934934
};
935935

936936
let lint = errors::LossyProvenancePtr2Int { expr_ty, cast_ty, sugg };
937-
fcx.tcx.emit_spanned_lint(
937+
fcx.tcx.emit_node_span_lint(
938938
lint::builtin::LOSSY_PROVENANCE_CASTS,
939939
self.expr.hir_id,
940940
self.span,
@@ -950,7 +950,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
950950
let expr_ty = fcx.resolve_vars_if_possible(self.expr_ty);
951951
let cast_ty = fcx.resolve_vars_if_possible(self.cast_ty);
952952
let lint = errors::LossyProvenanceInt2Ptr { expr_ty, cast_ty, sugg };
953-
fcx.tcx.emit_spanned_lint(
953+
fcx.tcx.emit_node_span_lint(
954954
lint::builtin::FUZZY_PROVENANCE_CASTS,
955955
self.expr.hir_id,
956956
self.span,

compiler/rustc_lint/src/async_fn_in_trait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl<'tcx> LateLintPass<'tcx> for AsyncFnInTrait {
116116
def.owner_id.def_id,
117117
" + Send",
118118
);
119-
cx.tcx.emit_spanned_lint(
119+
cx.tcx.emit_node_span_lint(
120120
ASYNC_FN_IN_TRAIT,
121121
item.hir_id(),
122122
async_span,

compiler/rustc_lint/src/expect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn check_expectations(tcx: TyCtxt<'_>, tool_filter: Option<Symbol>) {
2929
{
3030
let rationale = expectation.reason.map(|rationale| ExpectationNote { rationale });
3131
let note = expectation.is_unfulfilled_lint_expectations.then_some(());
32-
tcx.emit_spanned_lint(
32+
tcx.emit_node_span_lint(
3333
UNFULFILLED_LINT_EXPECTATIONS,
3434
*hir_id,
3535
expectation.emission_span,

compiler/rustc_lint/src/foreign_modules.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ impl ClashingExternDeclarations {
161161
sub,
162162
}
163163
};
164-
tcx.emit_spanned_lint(
164+
tcx.emit_node_span_lint(
165165
CLASHING_EXTERN_DECLARATIONS,
166166
this_fi.hir_id(),
167167
mismatch_label,

0 commit comments

Comments
 (0)