mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
internal: remove useless helpers
We generally avoid "syntax only" helper wrappers, which don't do much: they make code easier to write, but harder to read. They also make investigations harder, as "find_usages" needs to be invoked both for the wrapped and unwrapped APIs
This commit is contained in:
parent
977fef713e
commit
9aa6be71a5
12 changed files with 32 additions and 36 deletions
|
@ -107,7 +107,7 @@ pub fn expand_eager_macro(
|
|||
mut diagnostic_sink: &mut dyn FnMut(mbe::ExpandError),
|
||||
) -> Result<MacroCallId, ErrorEmitted> {
|
||||
let parsed_args = diagnostic_sink.option_with(
|
||||
|| Some(mbe::ast_to_token_tree(¯o_call.value.token_tree()?).0),
|
||||
|| Some(mbe::syntax_node_to_token_tree(¯o_call.value.token_tree()?.syntax()).0),
|
||||
|| err("malformed macro invocation"),
|
||||
)?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue