mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
fix: Fix parser panicking on invalid asm options
This commit is contained in:
parent
f74a0c8801
commit
5b79d922b2
2 changed files with 6 additions and 0 deletions
|
@ -434,6 +434,7 @@ fn parse_options(p: &mut Parser<'_>) {
|
|||
let m = p.start();
|
||||
if !OPTIONS.iter().any(|&syntax| p.eat_contextual_kw(syntax)) {
|
||||
p.err_and_bump("expected asm option");
|
||||
m.abandon(p);
|
||||
continue;
|
||||
}
|
||||
m.complete(p, ASM_OPTION);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue