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 {
|
||||
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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue