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
|
@ -100,7 +100,7 @@ impl<'tcx> Visitor<'tcx> for ConstMutationChecker<'_, 'tcx> {
|
|||
&& let Some((lint_root, span, item)) =
|
||||
self.should_lint_const_item_usage(lhs, def_id, loc)
|
||||
{
|
||||
self.tcx.emit_spanned_lint(
|
||||
self.tcx.emit_node_span_lint(
|
||||
CONST_ITEM_MUTATION,
|
||||
lint_root,
|
||||
span,
|
||||
|
@ -145,7 +145,7 @@ impl<'tcx> Visitor<'tcx> for ConstMutationChecker<'_, 'tcx> {
|
|||
if let Some((lint_root, span, item)) =
|
||||
self.should_lint_const_item_usage(place, def_id, lint_loc)
|
||||
{
|
||||
self.tcx.emit_spanned_lint(
|
||||
self.tcx.emit_node_span_lint(
|
||||
CONST_ITEM_MUTATION,
|
||||
lint_root,
|
||||
span,
|
||||
|
|
|
@ -527,7 +527,7 @@ fn report_unused_unsafe(tcx: TyCtxt<'_>, kind: UnusedUnsafe, id: HirId) {
|
|||
} else {
|
||||
None
|
||||
};
|
||||
tcx.emit_spanned_lint(UNUSED_UNSAFE, id, span, errors::UnusedUnsafe { span, nested_parent });
|
||||
tcx.emit_node_span_lint(UNUSED_UNSAFE, id, span, errors::UnusedUnsafe { span, nested_parent });
|
||||
}
|
||||
|
||||
pub fn check_unsafety(tcx: TyCtxt<'_>, def_id: LocalDefId) {
|
||||
|
@ -577,7 +577,7 @@ pub fn check_unsafety(tcx: TyCtxt<'_>, def_id: LocalDefId) {
|
|||
});
|
||||
}
|
||||
UnsafetyViolationKind::UnsafeFn => {
|
||||
tcx.emit_spanned_lint(
|
||||
tcx.emit_node_span_lint(
|
||||
UNSAFE_OP_IN_UNSAFE_FN,
|
||||
lint_root,
|
||||
source_info.span,
|
||||
|
|
|
@ -278,7 +278,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
|
|||
|
||||
fn report_assert_as_lint(&self, source_info: &SourceInfo, lint: AssertLint<impl Debug>) {
|
||||
if let Some(lint_root) = self.lint_root(*source_info) {
|
||||
self.tcx.emit_spanned_lint(lint.lint(), lint_root, source_info.span, lint);
|
||||
self.tcx.emit_node_span_lint(lint.lint(), lint_root, source_info.span, lint);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2071,7 +2071,7 @@ fn check_must_not_suspend_def(
|
|||
span: data.source_span,
|
||||
reason: s.as_str().to_string(),
|
||||
});
|
||||
tcx.emit_spanned_lint(
|
||||
tcx.emit_node_span_lint(
|
||||
rustc_session::lint::builtin::MUST_NOT_SUSPEND,
|
||||
hir_id,
|
||||
data.source_span,
|
||||
|
|
|
@ -112,7 +112,7 @@ fn has_ffi_unwind_calls(tcx: TyCtxt<'_>, local_def_id: LocalDefId) -> bool {
|
|||
let span = terminator.source_info.span;
|
||||
|
||||
let foreign = fn_def_id.is_some();
|
||||
tcx.emit_spanned_lint(
|
||||
tcx.emit_node_span_lint(
|
||||
FFI_UNWIND_CALLS,
|
||||
lint_root,
|
||||
span,
|
||||
|
|
|
@ -185,7 +185,7 @@ impl<'tcx> FunctionItemRefChecker<'_, 'tcx> {
|
|||
ret,
|
||||
);
|
||||
|
||||
self.tcx.emit_spanned_lint(
|
||||
self.tcx.emit_node_span_lint(
|
||||
FUNCTION_ITEM_REFERENCES,
|
||||
lint_root,
|
||||
span,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue