mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +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! {{
|
let expanded = quote! {{
|
||||||
##literals
|
##literals
|
||||||
()
|
loop {}
|
||||||
}};
|
}};
|
||||||
ExpandResult::ok(expanded)
|
ExpandResult::ok(expanded)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue