From c625d3183cfc64184f5f68687a964ef83f41f199 Mon Sep 17 00:00:00 2001 From: PankajChaudhary5 Date: Wed, 23 Dec 2020 11:02:04 +0530 Subject: [PATCH] Updated the match with the matches macro --- compiler/rustc_middle/src/ty/sty.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index a955cca53cc8b..aa0751ae60451 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -205,10 +205,7 @@ pub enum TyKind<'tcx> { impl TyKind<'tcx> { #[inline] pub fn is_primitive(&self) -> bool { - match self { - Bool | Char | Int(_) | Uint(_) | Float(_) => true, - _ => false, - } + matches!(self, Bool | Char | Int(_) | Uint(_) | Float(_)) } }