Rollup merge of #80327 - PankajChaudhary5:PankajChaudhary, r=GuillaumeGomez
Updated the match with the matches macro r?````@GuillaumeGomez````
This commit is contained in:
commit
2dab627d77
1 changed files with 1 additions and 4 deletions
|
@ -215,10 +215,7 @@ pub enum TyKind<'tcx> {
|
||||||
impl TyKind<'tcx> {
|
impl TyKind<'tcx> {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn is_primitive(&self) -> bool {
|
pub fn is_primitive(&self) -> bool {
|
||||||
match self {
|
matches!(self, Bool | Char | Int(_) | Uint(_) | Float(_))
|
||||||
Bool | Char | Int(_) | Uint(_) | Float(_) => true,
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the article ("a" or "an") to use with this type.
|
/// Get the article ("a" or "an") to use with this type.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue