Skip to content

Commit d5f651c

Browse files
authored
Rollup merge of #80327 - PankajChaudhary5:PankajChaudhary, r=GuillaumeGomez
Updated the match with the matches macro r?```@GuillaumeGomez```
2 parents f4d9a3d + c625d31 commit d5f651c

File tree

1 file changed

+1
-4
lines changed
  • compiler/rustc_middle/src/ty

1 file changed

+1
-4
lines changed

compiler/rustc_middle/src/ty/sty.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,7 @@ pub enum TyKind<'tcx> {
215215
impl TyKind<'tcx> {
216216
#[inline]
217217
pub fn is_primitive(&self) -> bool {
218-
match self {
219-
Bool | Char | Int(_) | Uint(_) | Float(_) => true,
220-
_ => false,
221-
}
218+
matches!(self, Bool | Char | Int(_) | Uint(_) | Float(_))
222219
}
223220

224221
/// Get the article ("a" or "an") to use with this type.

0 commit comments

Comments
 (0)