Remove reached_eof from ParseSess
It was only ever set in a function which isn't called anywhere.
This commit is contained in:
parent
5f3abbc52f
commit
ef2da4a49b
4 changed files with 1 additions and 24 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue