From 27cc7c7d9fb8a25cce9ab73ece034a9282406ce3 Mon Sep 17 00:00:00 2001 From: Camelid Date: Fri, 12 Jun 2020 11:39:52 -0700 Subject: [PATCH] Clean up --- src/librustc_builtin_macros/asm.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustc_builtin_macros/asm.rs b/src/librustc_builtin_macros/asm.rs index 8f6b8903d66..2be45daef98 100644 --- a/src/librustc_builtin_macros/asm.rs +++ b/src/librustc_builtin_macros/asm.rs @@ -174,7 +174,7 @@ fn parse_args<'a>( // Validate the order of named, positional & explicit register operands and options. We do // this at the end once we have the full span of the argument available. - if args.options_spans.len() > 0 { + if !args.options_spans.is_empty() { ecx.struct_span_err(span, "arguments are not allowed after options") .span_labels(args.options_spans.clone(), "previous options") .span_label(span, "argument") @@ -241,9 +241,9 @@ fn parse_args<'a>( if args.options.contains(ast::InlineAsmOptions::PURE) && !args.options.intersects(ast::InlineAsmOptions::NOMEM | ast::InlineAsmOptions::READONLY) { - let span = args.options_spans.clone(); + let spans = args.options_spans.clone(); ecx.struct_span_err( - span, + spans, "the `pure` option must be combined with either `nomem` or `readonly`", ) .emit();