Introduce OwnerNode::Crate.
This commit is contained in:
parent
36a28060f1
commit
fee421685d
17 changed files with 69 additions and 65 deletions
|
@ -183,7 +183,7 @@ fn configure_main(tcx: TyCtxt<'_>, visitor: &EntryContext<'_, '_>) -> Option<(De
|
|||
}
|
||||
|
||||
fn no_main_err(tcx: TyCtxt<'_>, visitor: &EntryContext<'_, '_>) {
|
||||
let sp = tcx.hir().krate().item.inner;
|
||||
let sp = tcx.hir().krate().module().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