Improve the code quality by using matches macro
This commit is contained in:
parent
d9985fc108
commit
57b5f8cbb9
1 changed files with 2 additions and 8 deletions
|
@ -1628,17 +1628,11 @@ impl RegionKind {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_late_bound(&self) -> bool {
|
pub fn is_late_bound(&self) -> bool {
|
||||||
match *self {
|
matches!(*self, ty::ReLateBound(..))
|
||||||
ty::ReLateBound(..) => true,
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_placeholder(&self) -> bool {
|
pub fn is_placeholder(&self) -> bool {
|
||||||
match *self {
|
matches!(*self, ty::RePlaceholder(..))
|
||||||
ty::RePlaceholder(..) => true,
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn bound_at_or_above_binder(&self, index: DebruijnIndex) -> bool {
|
pub fn bound_at_or_above_binder(&self, index: DebruijnIndex) -> bool {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue