Skip to content

Commit

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

Updated the match with the matches macro

r?```@GuillaumeGomez```
  • Loading branch information
Dylan-DPC authored Dec 24, 2020
2 parents f4d9a3d + c625d31 commit d5f651c
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 d5f651c

Please sign in to comment.