diff --git a/compiler/rustc_next_trait_solver/src/lib.rs b/compiler/rustc_next_trait_solver/src/lib.rs index 117751810e29..5fa29b7d9f81 100644 --- a/compiler/rustc_next_trait_solver/src/lib.rs +++ b/compiler/rustc_next_trait_solver/src/lib.rs @@ -8,7 +8,6 @@ #![allow(rustc::direct_use_of_rustc_type_ir)] #![allow(rustc::usage_of_type_ir_inherent)] #![allow(rustc::usage_of_type_ir_traits)] -#![deny(clippy::manual_let_else)] // tidy-alphabetical-end pub mod canonical; diff --git a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs index 1c79a2fd65de..8d0a3ac94d5a 100644 --- a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs +++ b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs @@ -810,16 +810,18 @@ where pub(super) fn term_is_fully_unconstrained(&self, goal: Goal>) -> bool { let universe_of_term = match goal.predicate.term.kind() { ty::TermKind::Ty(ty) => { - let ty::Infer(ty::TyVar(vid)) = ty.kind() else { + if let ty::Infer(ty::TyVar(vid)) = ty.kind() { + self.delegate.universe_of_ty(vid).unwrap() + } else { return false; - }; - self.delegate.universe_of_ty(vid).unwrap() + } } ty::TermKind::Const(ct) => { - let ty::ConstKind::Infer(ty::InferConst::Var(vid)) = ct.kind() else { + if let ty::ConstKind::Infer(ty::InferConst::Var(vid)) = ct.kind() { + self.delegate.universe_of_ct(vid).unwrap() + } else { return false; - }; - self.delegate.universe_of_ct(vid).unwrap() + } } };