Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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`
GuillaumeGomez authored Dec 23, 2020
2 parents f21c845 + c625d31 commit 9dec86d
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
@@ -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.

0 comments on commit 9dec86d

Please sign in to comment.