diff options
| author | PankajChaudhary5 <pankajchaudhary172@gmail.com> | 2020-12-23 11:02:04 +0530 |
|---|---|---|
| committer | PankajChaudhary5 <pankajchaudhary172@gmail.com> | 2020-12-23 11:02:04 +0530 |
| commit | c625d3183cfc64184f5f68687a964ef83f41f199 (patch) | |
| tree | cf8ed71a7932fe66f7a2de7aa08562fa981cc8d2 | |
| parent | 57b5f8cbb922ecb53baf5bf619a72996f8f1fb46 (diff) | |
| download | rust-c625d3183cfc64184f5f68687a964ef83f41f199.tar.gz rust-c625d3183cfc64184f5f68687a964ef83f41f199.zip | |
Updated the match with the matches macro
| -rw-r--r-- | compiler/rustc_middle/src/ty/sty.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index a955cca53cc..aa0751ae604 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(_)) } } |
