File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -133,16 +133,14 @@ pub(crate) fn macro_expand(
133133 macro_expand_with_arg ( db, id, None )
134134}
135135
136- // TODO hack
137136pub fn expander (
138137 db : & dyn AstDatabase ,
139138 id : MacroCallId ,
140139) -> Option < Arc < ( TokenExpander , mbe:: TokenMap ) > > {
141140 let lazy_id = match id {
142141 MacroCallId :: LazyMacro ( id) => id,
143142 MacroCallId :: EagerMacro ( _id) => {
144- // TODO
145- unimplemented ! ( )
143+ return None ;
146144 }
147145 } ;
148146
@@ -159,8 +157,11 @@ pub(crate) fn macro_expand_with_arg(
159157 let lazy_id = match id {
160158 MacroCallId :: LazyMacro ( id) => id,
161159 MacroCallId :: EagerMacro ( id) => {
162- // TODO
163- return Ok ( db. lookup_intern_eager_expansion ( id) . subtree ) ;
160+ if arg. is_some ( ) {
161+ return Err ( "hypothetical macro expansion not implemented for eager macro" . to_owned ( ) ) ;
162+ } else {
163+ return Ok ( db. lookup_intern_eager_expansion ( id) . subtree ) ;
164+ }
164165 }
165166 } ;
166167
You can’t perform that action at this time.
0 commit comments