Adopt let else in more places
This commit is contained in:
parent
b8c56fa8c3
commit
2ef8af6619
132 changed files with 539 additions and 881 deletions
|
@ -635,9 +635,8 @@ pub struct WhereBoundPredicate<'hir> {
|
|||
impl<'hir> WhereBoundPredicate<'hir> {
|
||||
/// Returns `true` if `param_def_id` matches the `bounded_ty` of this predicate.
|
||||
pub fn is_param_bound(&self, param_def_id: DefId) -> bool {
|
||||
let path = match self.bounded_ty.kind {
|
||||
TyKind::Path(QPath::Resolved(None, path)) => path,
|
||||
_ => return false,
|
||||
let TyKind::Path(QPath::Resolved(None, path)) = self.bounded_ty.kind else {
|
||||
return false;
|
||||
};
|
||||
match path.res {
|
||||
Res::Def(DefKind::TyParam, def_id)
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#![feature(associated_type_defaults)]
|
||||
#![feature(const_btree_new)]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(let_else)]
|
||||
#![feature(once_cell)]
|
||||
#![feature(min_specialization)]
|
||||
#![feature(never_type)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue