about summary refs log tree commit diff
path: root/compiler/rustc_passes/src/naked_functions.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_passes/src/naked_functions.rs')
-rw-r--r--compiler/rustc_passes/src/naked_functions.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/rustc_passes/src/naked_functions.rs b/compiler/rustc_passes/src/naked_functions.rs
index 607973446fc..2690be66c21 100644
--- a/compiler/rustc_passes/src/naked_functions.rs
+++ b/compiler/rustc_passes/src/naked_functions.rs
@@ -65,9 +65,13 @@ fn check_abi(tcx: TyCtxt<'_>, def_id: LocalDefId, abi: Abi) {
     if abi == Abi::Rust {
         let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
         let span = tcx.def_span(def_id);
-        tcx.struct_span_lint_hir(UNDEFINED_NAKED_FUNCTION_ABI, hir_id, span, |lint| {
-            lint.build("Rust ABI is unsupported in naked functions").emit();
-        });
+        tcx.struct_span_lint_hir(
+            UNDEFINED_NAKED_FUNCTION_ABI,
+            hir_id,
+            span,
+            "Rust ABI is unsupported in naked functions",
+            |lint| lint,
+        );
     }
 }