We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 59873e7 + c625d31 commit b48e221Copy full SHA for b48e221
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