1
Fork 0

Rollup merge of #80298 - PankajChaudhary5:PankajChaudhary, r=GuillaumeGomez

Improve the code quality by using matches macro

Improved the code quality by using matches macro
r? `@GuillaumeGomez`
This commit is contained in:
Guillaume Gomez 2020-12-23 00:13:56 +01:00 committed by GitHub
commit 5af144ece1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1572,17 +1572,11 @@ impl RegionKind {
}
pub fn is_late_bound(&self) -> bool {
match *self {
ty::ReLateBound(..) => true,
_ => false,
}
matches!(*self, ty::ReLateBound(..))
}
pub fn is_placeholder(&self) -> bool {
match *self {
ty::RePlaceholder(..) => true,
_ => false,
}
matches!(*self, ty::RePlaceholder(..))
}
pub fn bound_at_or_above_binder(&self, index: ty::DebruijnIndex) -> bool {