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.
|
||||
|
|
|
@ -686,7 +686,7 @@ fn new_index(tcx: TyCtxt<'tcx>) -> Index<'tcx> {
|
|||
|
||||
annotator.annotate(
|
||||
hir::CRATE_HIR_ID,
|
||||
krate.item.span,
|
||||
krate.item.inner,
|
||||
AnnotationKind::Required,
|
||||
InheritDeprecation::Yes,
|
||||
InheritConstStability::No,
|
||||
|
@ -885,7 +885,7 @@ pub fn check_unused_or_stable_features(tcx: TyCtxt<'_>) {
|
|||
if tcx.stability().staged_api[&LOCAL_CRATE] {
|
||||
let krate = tcx.hir().krate();
|
||||
let mut missing = MissingStabilityAnnotations { tcx, access_levels };
|
||||
missing.check_missing_stability(hir::CRATE_HIR_ID, krate.item.span);
|
||||
missing.check_missing_stability(hir::CRATE_HIR_ID, krate.item.inner);
|
||||
intravisit::walk_crate(&mut missing, krate);
|
||||
krate.visit_all_item_likes(&mut missing.as_deep_visitor());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue