Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit e8be797

Browse files
committed
Use bitflags function instead of custom one
1 parent c7da50d commit e8be797

File tree

1 file changed

+1
-7
lines changed
  • src/librustc_builtin_macros

1 file changed

+1
-7
lines changed

src/librustc_builtin_macros/asm.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ struct AsmArgs {
1919
options_spans: Vec<Span>,
2020
}
2121

22-
impl AsmArgs {
23-
fn option_is_set(&self, option: ast::InlineAsmOptions) -> bool {
24-
(self.options & option) == option
25-
}
26-
}
27-
2822
fn parse_args<'a>(
2923
ecx: &mut ExtCtxt<'a>,
3024
sp: Span,
@@ -304,7 +298,7 @@ fn try_set_option<'a>(
304298
symbol: Symbol,
305299
option: ast::InlineAsmOptions,
306300
) {
307-
if !args.option_is_set(option) {
301+
if !args.options.contains(option) {
308302
args.options |= option;
309303
} else {
310304
err_duplicate_option(p, symbol, p.prev_token.span);

0 commit comments

Comments
 (0)