@@ -46,6 +46,7 @@ use crate::{
46
46
} ,
47
47
path:: { ImportAlias , ModPath , PathKind } ,
48
48
per_ns:: PerNs ,
49
+ tt,
49
50
visibility:: { RawVisibility , Visibility } ,
50
51
AdtId , AstId , AstIdWithPath , ConstLoc , EnumLoc , EnumVariantId , ExternBlockLoc , FunctionId ,
51
52
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
83
84
. enumerate ( )
84
85
. map ( |( idx, it) | {
85
86
// 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 ( ) } ;
87
89
(
88
90
name. as_name ( ) ,
89
91
ProcMacroExpander :: new ( def_map. krate , base_db:: ProcMacroId ( idx as u32 ) ) ,
@@ -451,7 +453,10 @@ impl DefCollector<'_> {
451
453
directive. module_id ,
452
454
MacroCallKind :: Attr {
453
455
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
+ ) ) ,
455
460
invoc_attr_index : attr. id ,
456
461
is_derive : false ,
457
462
} ,
@@ -1947,7 +1952,8 @@ impl ModCollector<'_, '_> {
1947
1952
let name = match attrs. by_key ( "rustc_builtin_macro" ) . string_value ( ) {
1948
1953
Some ( it) => {
1949
1954
// 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 ( ) ;
1951
1957
& name
1952
1958
}
1953
1959
None => {
0 commit comments