mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
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:
parent
c8d0a90145
commit
1be8b2ff98
1 changed files with 1 additions and 1 deletions
|
@ -295,7 +295,7 @@ fn asm_expand(
|
|||
|
||||
let expanded = quote! {{
|
||||
##literals
|
||||
()
|
||||
loop {}
|
||||
}};
|
||||
ExpandResult::ok(expanded)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue