Skip to content

Commit

Permalink
Rollup merge of #80327 - PankajChaudhary5:PankajChaudhary, r=Guillaum…
Browse files Browse the repository at this point in the history
…eGomez

Updated the match with the matches macro

r?`@GuillaumeGomez`
  • Loading branch information
Dylan-DPC authored Dec 23, 2020
2 parents 59873e7 + c625d31 commit b48e221
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions compiler/rustc_middle/src/ty/sty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b48e221

Please sign in to comment.