Merge #11852
11852: Type mismatch when last expression is noreturn asm r=lnicola a=weirdsmiley 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. Fixes: [#11820](https://github.com/rust-analyzer/rust-analyzer/issues/11820) Co-authored-by: Manas <manas18244@iiitd.ac.in>
This commit is contained in:
commit
259182b50b
@ -295,7 +295,7 @@ fn asm_expand(
|
||||
|
||||
let expanded = quote! {{
|
||||
##literals
|
||||
()
|
||||
loop {}
|
||||
}};
|
||||
ExpandResult::ok(expanded)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user