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

Commit 27cc7c7

Browse files
committed
Clean up
1 parent 1d2acdf commit 27cc7c7

File tree

1 file changed

+3
-3
lines changed
  • src/librustc_builtin_macros

1 file changed

+3
-3
lines changed

src/librustc_builtin_macros/asm.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ fn parse_args<'a>(
174174

175175
// Validate the order of named, positional & explicit register operands and options. We do
176176
// this at the end once we have the full span of the argument available.
177-
if args.options_spans.len() > 0 {
177+
if !args.options_spans.is_empty() {
178178
ecx.struct_span_err(span, "arguments are not allowed after options")
179179
.span_labels(args.options_spans.clone(), "previous options")
180180
.span_label(span, "argument")
@@ -241,9 +241,9 @@ fn parse_args<'a>(
241241
if args.options.contains(ast::InlineAsmOptions::PURE)
242242
&& !args.options.intersects(ast::InlineAsmOptions::NOMEM | ast::InlineAsmOptions::READONLY)
243243
{
244-
let span = args.options_spans.clone();
244+
let spans = args.options_spans.clone();
245245
ecx.struct_span_err(
246-
span,
246+
spans,
247247
"the `pure` option must be combined with either `nomem` or `readonly`",
248248
)
249249
.emit();

0 commit comments

Comments
 (0)