1
Fork 0

Remove hir::CrateItem.

This commit is contained in:
Camille GILLOT 2021-03-30 20:31:06 +02:00
parent 16156fb278
commit 9d8f833e05
15 changed files with 26 additions and 40 deletions

View file

@ -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.