Remove hir::CrateItem.
This commit is contained in:
parent
16156fb278
commit
9d8f833e05
15 changed files with 26 additions and 40 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue