Type mismatch when last expression is noreturn asm

When last expression in a function body is noreturn asm, then analyzer
complains about the type mismatch by highlighting entire body. This
fixes it by introducing loop {} in the expanded code.
This commit is contained in:
Manas 2022-03-30 19:02:27 +05:30
parent c8d0a90145
commit 1be8b2ff98

View File

@ -295,7 +295,7 @@ fn asm_expand(
let expanded = quote! {{
##literals
()
loop {}
}};
ExpandResult::ok(expanded)
}