@@ -61,10 +61,10 @@ use rustc_hir::def::{CtorKind, CtorOf, DefKind, Res};
6161use rustc_hir:: def_id:: { DefId , LOCAL_CRATE } ;
6262use rustc_hir:: intravisit:: { self , NestedVisitorMap , Visitor } ;
6363use rustc_hir:: {
64- def, Arm , BindingAnnotation , Block , Body , Constness , CrateItem , Expr , ExprKind , FieldDef , FnDecl , ForeignItem ,
65- GenericArgs , GenericParam , HirId , Impl , ImplItem , ImplItemKind , Item , ItemKind , LangItem , Lifetime , Local ,
66- MacroDef , MatchSource , Node , Param , Pat , PatKind , Path , PathSegment , QPath , Stmt , TraitItem , TraitItemKind ,
67- TraitRef , TyKind , Variant , Visibility ,
64+ def, Arm , BindingAnnotation , Block , Body , Constness , Expr , ExprKind , FieldDef , FnDecl , ForeignItem , GenericArgs ,
65+ GenericParam , HirId , Impl , ImplItem , ImplItemKind , Item , ItemKind , LangItem , Lifetime , Local , MacroDef ,
66+ MatchSource , Mod , Node , Param , Pat , PatKind , Path , PathSegment , QPath , Stmt , TraitItem , TraitItemKind , TraitRef ,
67+ TyKind , Variant , Visibility ,
6868} ;
6969use rustc_lint:: { LateContext , Level , Lint , LintContext } ;
7070use rustc_middle:: hir:: exports:: Export ;
@@ -743,7 +743,7 @@ pub fn get_node_span(node: Node<'_>) -> Option<Span> {
743743 | Node :: Lifetime ( Lifetime { span, .. } )
744744 | Node :: GenericParam ( GenericParam { span, .. } )
745745 | Node :: Visibility ( Visibility { span, .. } )
746- | Node :: Crate ( CrateItem { span, .. } ) => Some ( * span) ,
746+ | Node :: Crate ( Mod { inner : span, .. } ) => Some ( * span) ,
747747 Node :: Ctor ( _) | Node :: AnonConst ( _) => None ,
748748 }
749749}
0 commit comments