From f617455d10084da30a13cc49ffdd6b86c6049ba1 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 7 Mar 2020 19:58:18 +0100 Subject: Remove TODOs --- crates/ra_hir_expand/src/db.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'crates/ra_hir_expand') diff --git a/crates/ra_hir_expand/src/db.rs b/crates/ra_hir_expand/src/db.rs index a7aa60fc9..f5c8bc22f 100644 --- a/crates/ra_hir_expand/src/db.rs +++ b/crates/ra_hir_expand/src/db.rs @@ -133,7 +133,6 @@ pub(crate) fn macro_expand( macro_expand_with_arg(db, id, None) } -// TODO hack pub fn expander( db: &dyn AstDatabase, id: MacroCallId, @@ -141,8 +140,7 @@ pub fn expander( let lazy_id = match id { MacroCallId::LazyMacro(id) => id, MacroCallId::EagerMacro(_id) => { - // TODO - unimplemented!() + return None; } }; @@ -159,8 +157,11 @@ pub(crate) fn macro_expand_with_arg( let lazy_id = match id { MacroCallId::LazyMacro(id) => id, MacroCallId::EagerMacro(id) => { - // TODO - return Ok(db.lookup_intern_eager_expansion(id).subtree); + if arg.is_some() { + return Err("hypothetical macro expansion not implemented for eager macro".to_owned()); + } else { + return Ok(db.lookup_intern_eager_expansion(id).subtree); + } } }; -- cgit v1.2.3