about summary refs log tree commit diff
path: root/compiler/rustc_passes/src/entry.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_passes/src/entry.rs')
-rw-r--r--compiler/rustc_passes/src/entry.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_passes/src/entry.rs b/compiler/rustc_passes/src/entry.rs
index 57848208f94..e53f821e6da 100644
--- a/compiler/rustc_passes/src/entry.rs
+++ b/compiler/rustc_passes/src/entry.rs
@@ -171,7 +171,7 @@ fn configure_main(
 }
 
 fn no_main_err(tcx: TyCtxt<'_>, visitor: &EntryContext<'_, '_>) {
-    let sp = tcx.hir().krate().item.span;
+    let sp = tcx.hir().krate().item.inner;
     if *tcx.sess.parse_sess.reached_eof.borrow() {
         // There's an unclosed brace that made the parser reach `Eof`, we shouldn't complain about
         // the missing `fn main()` then as it might have been hidden inside an unclosed block.