about summary refs log tree commit diff
path: root/compiler/rustc_passes/src/entry.rs
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2023-08-13 11:30:48 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2023-08-13 13:33:37 +0000
commitef2da4a49b95ff83c232c04c3df1e02244cedd82 (patch)
tree6e33e92865e1e002250487bce938ccb641866bb7 /compiler/rustc_passes/src/entry.rs
parent5f3abbc52fc460c05f24648cce3969a41c0b02e9 (diff)
downloadrust-ef2da4a49b95ff83c232c04c3df1e02244cedd82.tar.gz
rust-ef2da4a49b95ff83c232c04c3df1e02244cedd82.zip
Remove reached_eof from ParseSess
It was only ever set in a function which isn't called anywhere.
Diffstat (limited to 'compiler/rustc_passes/src/entry.rs')
-rw-r--r--compiler/rustc_passes/src/entry.rs6
1 files changed, 0 insertions, 6 deletions
diff --git a/compiler/rustc_passes/src/entry.rs b/compiler/rustc_passes/src/entry.rs
index 6a29159e917..4f71704b885 100644
--- a/compiler/rustc_passes/src/entry.rs
+++ b/compiler/rustc_passes/src/entry.rs
@@ -187,12 +187,6 @@ fn sigpipe(tcx: TyCtxt<'_>, def_id: DefId) -> u8 {
 
 fn no_main_err(tcx: TyCtxt<'_>, visitor: &EntryContext<'_>) {
     let sp = tcx.def_span(CRATE_DEF_ID);
-    if tcx.sess.parse_sess.reached_eof.load(rustc_data_structures::sync::Ordering::Relaxed) {
-        // 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.
-        tcx.sess.delay_span_bug(sp, "`main` not found, but expected unclosed brace error");
-        return;
-    }
 
     // There is no main function.
     let mut has_filename = true;