From 97c774215165b7422c2e6e18e52fc5d63f8669ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Fri, 12 Dec 2025 17:55:26 +0000 Subject: [PATCH] revert one change from rustc_next_trait_solver --- compiler/rustc_next_trait_solver/src/lib.rs | 1 - .../src/solve/eval_ctxt/mod.rs | 14 ++++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) 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() + } } };