Properly reject the may_unwind
option in global_asm!
This was accidentally accepted even though it had no effect in `global_asm!`. The option only makes sense for `asm!` which runs within a function.
This commit is contained in:
parent
9d5cd21a5d
commit
96c955e66b
5 changed files with 38 additions and 38 deletions
|
@ -410,12 +410,12 @@ fn parse_options<'a>(
|
|||
try_set_option(p, args, sym::noreturn, ast::InlineAsmOptions::NORETURN);
|
||||
} else if !is_global_asm && p.eat_keyword(sym::nostack) {
|
||||
try_set_option(p, args, sym::nostack, ast::InlineAsmOptions::NOSTACK);
|
||||
} else if !is_global_asm && p.eat_keyword(sym::may_unwind) {
|
||||
try_set_option(p, args, kw::Raw, ast::InlineAsmOptions::MAY_UNWIND);
|
||||
} else if p.eat_keyword(sym::att_syntax) {
|
||||
try_set_option(p, args, sym::att_syntax, ast::InlineAsmOptions::ATT_SYNTAX);
|
||||
} else if p.eat_keyword(kw::Raw) {
|
||||
try_set_option(p, args, kw::Raw, ast::InlineAsmOptions::RAW);
|
||||
} else if p.eat_keyword(sym::may_unwind) {
|
||||
try_set_option(p, args, kw::Raw, ast::InlineAsmOptions::MAY_UNWIND);
|
||||
} else {
|
||||
return p.unexpected();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue