@@ -12,11 +12,15 @@ use syntax::{
1212use triomphe:: Arc ;
1313
1414use crate :: {
15- ast_id_map:: AstIdMap , builtin_attr_macro:: pseudo_derive_attr_expansion,
16- builtin_fn_macro:: EagerExpander , fixup, hygiene:: HygieneFrame , tt, AstId , BuiltinAttrExpander ,
17- BuiltinDeriveExpander , BuiltinFnLikeExpander , EagerCallInfo , ExpandError , ExpandResult ,
18- ExpandTo , HirFileId , HirFileIdRepr , MacroCallId , MacroCallKind , MacroCallLoc , MacroDefId ,
19- MacroDefKind , MacroFile , ProcMacroExpander ,
15+ ast_id_map:: AstIdMap ,
16+ builtin_attr_macro:: pseudo_derive_attr_expansion,
17+ builtin_fn_macro:: EagerExpander ,
18+ fixup,
19+ hygiene:: HygieneFrame ,
20+ name:: { name, AsName } ,
21+ tt, AstId , BuiltinAttrExpander , BuiltinDeriveExpander , BuiltinFnLikeExpander , EagerCallInfo ,
22+ ExpandError , ExpandResult , ExpandTo , HirFileId , HirFileIdRepr , MacroCallId , MacroCallKind ,
23+ MacroCallLoc , MacroDefId , MacroDefKind , MacroFile , ProcMacroExpander ,
2024} ;
2125
2226/// Total limit on the number of tokens produced by any macro invocation.
@@ -620,7 +624,7 @@ fn macro_expand(db: &dyn ExpandDatabase, id: MacroCallId) -> ExpandResult<Arc<tt
620624 if let Some ( name_ref) =
621625 ast_id. to_node ( db) . path ( ) . and_then ( |p| p. segment ( ) ) . and_then ( |s| s. name_ref ( ) )
622626 {
623- name_ref. text ( ) == " include"
627+ name_ref. as_name ( ) == name ! ( include)
624628 } else {
625629 false
626630 }
0 commit comments