We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 77052ad + c625d31 commit aa29a28Copy full SHA for aa29a28
compiler/rustc_middle/src/ty/sty.rs
@@ -215,10 +215,7 @@ pub enum TyKind<'tcx> {
215
impl TyKind<'tcx> {
216
#[inline]
217
pub fn is_primitive(&self) -> bool {
218
- match self {
219
- Bool | Char | Int(_) | Uint(_) | Float(_) => true,
220
- _ => false,
221
- }
+ matches!(self, Bool | Char | Int(_) | Uint(_) | Float(_))
222
}
223
224
/// Get the article ("a" or "an") to use with this type.
0 commit comments