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:
commit
5af144ece1
1 changed files with 2 additions and 8 deletions
|
@ -1572,17 +1572,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: ty::DebruijnIndex) -> bool {
|
pub fn bound_at_or_above_binder(&self, index: ty::DebruijnIndex) -> bool {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue