@@ -46,6 +46,7 @@ use crate::{
4646 } ,
4747 path:: { ImportAlias , ModPath , PathKind } ,
4848 per_ns:: PerNs ,
49+ tt,
4950 visibility:: { RawVisibility , Visibility } ,
5051 AdtId , AstId , AstIdWithPath , ConstLoc , EnumLoc , EnumVariantId , ExternBlockLoc , FunctionId ,
5152 FunctionLoc , ImplLoc , Intern , ItemContainerId , LocalModuleId , Macro2Id , Macro2Loc ,
@@ -83,7 +84,8 @@ pub(super) fn collect_defs(db: &dyn DefDatabase, mut def_map: DefMap, tree_id: T
8384 . enumerate ( )
8485 . map ( |( idx, it) | {
8586 // FIXME: a hacky way to create a Name from string.
86- let name = tt:: Ident { text : it. name . clone ( ) , id : tt:: TokenId :: unspecified ( ) } ;
87+ let name =
88+ tt:: Ident { text : it. name . clone ( ) , span : tt:: TokenId :: unspecified ( ) } ;
8789 (
8890 name. as_name ( ) ,
8991 ProcMacroExpander :: new ( def_map. krate , base_db:: ProcMacroId ( idx as u32 ) ) ,
@@ -451,7 +453,10 @@ impl DefCollector<'_> {
451453 directive. module_id ,
452454 MacroCallKind :: Attr {
453455 ast_id : ast_id. ast_id ,
454- attr_args : Default :: default ( ) ,
456+ attr_args : std:: sync:: Arc :: new ( (
457+ tt:: Subtree :: empty ( ) ,
458+ Default :: default ( ) ,
459+ ) ) ,
455460 invoc_attr_index : attr. id ,
456461 is_derive : false ,
457462 } ,
@@ -1947,7 +1952,8 @@ impl ModCollector<'_, '_> {
19471952 let name = match attrs. by_key ( "rustc_builtin_macro" ) . string_value ( ) {
19481953 Some ( it) => {
19491954 // FIXME: a hacky way to create a Name from string.
1950- name = tt:: Ident { text : it. clone ( ) , id : tt:: TokenId :: unspecified ( ) } . as_name ( ) ;
1955+ name =
1956+ tt:: Ident { text : it. clone ( ) , span : tt:: TokenId :: unspecified ( ) } . as_name ( ) ;
19511957 & name
19521958 }
19531959 None => {
0 commit comments