revert one change from rustc_next_trait_solver · rust-lang/rust@97c7742 (original) (raw)

File tree

2 files changed

lines changed

2 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
8 8 #![allow(rustc::direct_use_of_rustc_type_ir)]
9 9 #![allow(rustc::usage_of_type_ir_inherent)]
10 10 #![allow(rustc::usage_of_type_ir_traits)]
11 -#![deny(clippy::manual_let_else)]
12 11 // tidy-alphabetical-end
13 12
14 13 pub mod canonical;
Original file line number Diff line number Diff line change
@@ -810,16 +810,18 @@ where
810 810 pub(super) fn term_is_fully_unconstrained(&self, goal: Goal<I, ty::NormalizesTo<I>>) -> bool {
811 811 let universe_of_term = match goal.predicate.term.kind() {
812 812 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 {
814 816 return false;
815 -};
816 -self.delegate.universe_of_ty(vid).unwrap()
817 +}
817 818 }
818 819 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 {
820 823 return false;
821 -};
822 -self.delegate.universe_of_ct(vid).unwrap()
824 +}
823 825 }
824 826 };
825 827