Skip to content

Commit 97c7742

Browse files
committed
revert one change from rustc_next_trait_solver
1 parent a49c175 commit 97c7742

File tree

2 files changed

+8
-7
lines changed
  • compiler/rustc_next_trait_solver/src

2 files changed

+8
-7
lines changed

compiler/rustc_next_trait_solver/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#![allow(rustc::direct_use_of_rustc_type_ir)]
99
#![allow(rustc::usage_of_type_ir_inherent)]
1010
#![allow(rustc::usage_of_type_ir_traits)]
11-
#![deny(clippy::manual_let_else)]
1211
// tidy-alphabetical-end
1312

1413
pub mod canonical;

compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -810,16 +810,18 @@ where
810810
pub(super) fn term_is_fully_unconstrained(&self, goal: Goal<I, ty::NormalizesTo<I>>) -> bool {
811811
let universe_of_term = match goal.predicate.term.kind() {
812812
ty::TermKind::Ty(ty) => {
813-
let ty::Infer(ty::TyVar(vid)) = ty.kind() else {
813+
if let ty::Infer(ty::TyVar(vid)) = ty.kind() {
814+
self.delegate.universe_of_ty(vid).unwrap()
815+
} else {
814816
return false;
815-
};
816-
self.delegate.universe_of_ty(vid).unwrap()
817+
}
817818
}
818819
ty::TermKind::Const(ct) => {
819-
let ty::ConstKind::Infer(ty::InferConst::Var(vid)) = ct.kind() else {
820+
if let ty::ConstKind::Infer(ty::InferConst::Var(vid)) = ct.kind() {
821+
self.delegate.universe_of_ct(vid).unwrap()
822+
} else {
820823
return false;
821-
};
822-
self.delegate.universe_of_ct(vid).unwrap()
824+
}
823825
}
824826
};
825827

0 commit comments

Comments
 (0)