// format_args_nl only differs in that it adds a newline in the end,
// so we use the same stub expansion for now
(format_args_nl, FormatArgsNl) => format_args_expand,
+ (llvm_asm, LlvmAsm) => asm_expand,
+ (asm, Asm) => asm_expand,
EAGER:
(compile_error, CompileError) => compile_error_expand,
ExpandResult::ok(expanded)
}
+fn asm_expand(
+ _db: &dyn AstDatabase,
+ _id: LazyMacroId,
+ _tt: &tt::Subtree,
+) -> ExpandResult<tt::Subtree> {
+ // both asm and llvm_asm don't return anything, so we can expand them to nothing,
+ // for now
+ let expanded = quote! {
+ ()
+ };
+ ExpandResult::ok(expanded)
+}
+
fn unquote_str(lit: &tt::Literal) -> Option<String> {
let lit = ast::make::tokens::literal(&lit.to_string());
let token = ast::String::cast(lit)?;