about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src/llvm_asm.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2020-12-24 02:55:21 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2020-12-24 13:35:12 +0100
commitd12a358673b17ed74fe1a584b4cab66fe62e18d0 (patch)
tree4e2431f555f0dd3fa5df51ac629470f8112c01cd /compiler/rustc_builtin_macros/src/llvm_asm.rs
parentc34c015fe2710caf53ba7ae9d1644f9ba65a6f74 (diff)
downloadrust-d12a358673b17ed74fe1a584b4cab66fe62e18d0.tar.gz
rust-d12a358673b17ed74fe1a584b4cab66fe62e18d0.zip
use matches!() macro in more places
Diffstat (limited to 'compiler/rustc_builtin_macros/src/llvm_asm.rs')
-rw-r--r--compiler/rustc_builtin_macros/src/llvm_asm.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rustc_builtin_macros/src/llvm_asm.rs b/compiler/rustc_builtin_macros/src/llvm_asm.rs
index db73fdbe24f..d203b5bc542 100644
--- a/compiler/rustc_builtin_macros/src/llvm_asm.rs
+++ b/compiler/rustc_builtin_macros/src/llvm_asm.rs
@@ -87,9 +87,11 @@ fn parse_inline_asm<'a>(
     // parsed as `llvm_asm!(z)` with `z = "x": y` which is type ascription.
     let first_colon = tts
         .trees()
-        .position(|tt| match tt {
-            tokenstream::TokenTree::Token(Token { kind: token::Colon | token::ModSep, .. }) => true,
-            _ => false,
+        .position(|tt| {
+            matches!(
+                tt,
+                tokenstream::TokenTree::Token(Token { kind: token::Colon | token::ModSep, .. })
+            )
         })
         .unwrap_or(tts.len());
     let mut p = cx.new_parser_from_tts(tts.trees().skip(first_colon).collect());