mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-31 15:47:31 +00:00
Remove TODOs
This commit is contained in:
parent
941a574409
commit
f617455d10
1 changed files with 6 additions and 5 deletions
|
@ -133,7 +133,6 @@ pub(crate) fn macro_expand(
|
||||||
macro_expand_with_arg(db, id, None)
|
macro_expand_with_arg(db, id, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO hack
|
|
||||||
pub fn expander(
|
pub fn expander(
|
||||||
db: &dyn AstDatabase,
|
db: &dyn AstDatabase,
|
||||||
id: MacroCallId,
|
id: MacroCallId,
|
||||||
|
@ -141,8 +140,7 @@ pub fn expander(
|
||||||
let lazy_id = match id {
|
let lazy_id = match id {
|
||||||
MacroCallId::LazyMacro(id) => id,
|
MacroCallId::LazyMacro(id) => id,
|
||||||
MacroCallId::EagerMacro(_id) => {
|
MacroCallId::EagerMacro(_id) => {
|
||||||
// TODO
|
return None;
|
||||||
unimplemented!()
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -159,8 +157,11 @@ pub(crate) fn macro_expand_with_arg(
|
||||||
let lazy_id = match id {
|
let lazy_id = match id {
|
||||||
MacroCallId::LazyMacro(id) => id,
|
MacroCallId::LazyMacro(id) => id,
|
||||||
MacroCallId::EagerMacro(id) => {
|
MacroCallId::EagerMacro(id) => {
|
||||||
// TODO
|
if arg.is_some() {
|
||||||
return Ok(db.lookup_intern_eager_expansion(id).subtree);
|
return Err("hypothetical macro expansion not implemented for eager macro".to_owned());
|
||||||
|
} else {
|
||||||
|
return Ok(db.lookup_intern_eager_expansion(id).subtree);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue