Skip to content

Commit f617455

Browse files
committed
Remove TODOs
1 parent 941a574 commit f617455

File tree

1 file changed

+6
-5
lines changed
  • crates/ra_hir_expand/src

1 file changed

+6
-5
lines changed

crates/ra_hir_expand/src/db.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,14 @@ pub(crate) fn macro_expand(
133133
macro_expand_with_arg(db, id, None)
134134
}
135135

136-
// TODO hack
137136
pub 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

0 commit comments

Comments
 (0)