]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_mir_build/src/lints.rs
Fix `unknown_crate` when `--crate-name` isn't passed on the CLI
[rust.git] / compiler / rustc_mir_build / src / lints.rs
index 383598fb094b6053065e10a7006b96e4c788813e..8529c64cd5cca64213f3b1efedb38df29c0094b5 100644 (file)
@@ -37,10 +37,12 @@ pub(crate) fn check<'tcx>(tcx: TyCtxt<'tcx>, body: &Body<'tcx>) {
 
         let sp = tcx.def_span(def_id);
         let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
-        tcx.emit_spanned_lint(UNCONDITIONAL_RECURSION, hir_id, sp, UnconditionalRecursion {
-            span: sp,
-            call_sites: vis.reachable_recursive_calls,
-        });
+        tcx.emit_spanned_lint(
+            UNCONDITIONAL_RECURSION,
+            hir_id,
+            sp,
+            UnconditionalRecursion { span: sp, call_sites: vis.reachable_recursive_calls },
+        );
     }
 }