Improve the code quality by using matches macro
This commit is contained in:
parent
d9985fc108
commit
57b5f8cbb9
@ -1628,17 +1628,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: DebruijnIndex) -> bool {
|
||||
|
Loading…
x
Reference in New Issue
Block a user