Function ra_ap_hir_expand::db::expand_speculative[][src]

pub fn expand_speculative(
    db: &dyn AstDatabase,
    actual_macro_call: MacroCallId,
    speculative_args: &TokenTree,
    token_to_map: SyntaxToken
) -> Option<(SyntaxNode, SyntaxToken)>
Expand description

This expands the given macro call, but with different arguments. This is used for completion, where we want to see what ‘would happen’ if we insert a token. The token_to_map mapped down into the expansion, with the mapped token returned.