@@ -12,7 +12,7 @@ use rustc_ast::token;
12
12
use rustc_ast:: tokenstream:: TokenStream ;
13
13
use rustc_ast:: visit:: { self , AssocCtxt , Visitor } ;
14
14
use rustc_ast:: { AssocItemKind , AstLike , AstLikeWrapper , AttrStyle , ExprKind , ForeignItemKind } ;
15
- use rustc_ast:: { Inline , ItemKind , MacArgs , MacStmtStyle , MetaItemKind , ModKind , ModSpans } ;
15
+ use rustc_ast:: { Inline , ItemKind , MacArgs , MacStmtStyle , MetaItemKind , ModKind } ;
16
16
use rustc_ast:: { NestedMetaItem , NodeId , PatKind , StmtKind , TyKind } ;
17
17
use rustc_ast_pretty:: pprust;
18
18
use rustc_data_structures:: map_in_place:: MapInPlace ;
@@ -364,7 +364,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
364
364
}
365
365
366
366
pub fn expand_crate ( & mut self , krate : ast:: Crate ) -> ast:: Crate {
367
- let file_path = match self . cx . source_map ( ) . span_to_filename ( krate. span ) {
367
+ let file_path = match self . cx . source_map ( ) . span_to_filename ( krate. spans . inner_span ) {
368
368
FileName :: Real ( name) => name
369
369
. into_local_path ( )
370
370
. expect ( "attempting to resolve a file path in an external file" ) ,
@@ -1091,7 +1091,7 @@ impl InvocationCollectorNode for P<ast::Item> {
1091
1091
ModKind :: Unloaded => {
1092
1092
// We have an outline `mod foo;` so we need to parse the file.
1093
1093
let old_attrs_len = attrs. len ( ) ;
1094
- let ParsedExternalMod { items, inner_span , file_path, dir_path, dir_ownership } =
1094
+ let ParsedExternalMod { items, spans , file_path, dir_path, dir_ownership } =
1095
1095
parse_external_mod (
1096
1096
& ecx. sess ,
1097
1097
ident,
@@ -1112,7 +1112,7 @@ impl InvocationCollectorNode for P<ast::Item> {
1112
1112
) ;
1113
1113
}
1114
1114
1115
- * mod_kind = ModKind :: Loaded ( items, Inline :: No , ModSpans { inner_span } ) ;
1115
+ * mod_kind = ModKind :: Loaded ( items, Inline :: No , spans ) ;
1116
1116
node. attrs = attrs;
1117
1117
if node. attrs . len ( ) > old_attrs_len {
1118
1118
// If we loaded an out-of-line module and added some inner attributes,
0 commit comments