Rollup merge of #80327 - PankajChaudhary5:PankajChaudhary, r=GuillaumeGomez

Updated the match with the matches macro

r?````@GuillaumeGomez````
This commit is contained in:
Dylan DPC 2020-12-25 03:39:43 +01:00 committed by GitHub
commit 2dab627d77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -215,10 +215,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(_))
}
/// Get the article ("a" or "an") to use with this type.