Skip to content

Commit d794edb

Browse files
committed
fix next_trait_solver
1 parent 5f4a6cd commit d794edb

File tree

2 files changed

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

2 files changed

+8
-6
lines changed

compiler/rustc_next_trait_solver/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
//! but were uplifted in the process of making the new trait solver generic.
55
//! So if you got to this crate from the old solver, it's totally normal.
66
7-
#![feature(if_let_guard)]
87
// tidy-alphabetical-start
98
#![allow(rustc::direct_use_of_rustc_type_ir)]
109
#![allow(rustc::usage_of_type_ir_inherent)]

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -809,15 +809,18 @@ where
809809
#[instrument(level = "trace", skip(self), ret)]
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() {
812-
ty::TermKind::Ty(ty) if let ty::Infer(ty::TyVar(vid)) = ty.kind() => {
812+
ty::TermKind::Ty(ty) => {
813+
let ty::Infer(ty::TyVar(vid)) = ty.kind() else {
814+
return false;
815+
};
813816
self.delegate.universe_of_ty(vid).unwrap()
814817
}
815-
ty::TermKind::Const(ct)
816-
if let ty::ConstKind::Infer(ty::InferConst::Var(vid)) = ct.kind() =>
817-
{
818+
ty::TermKind::Const(ct) => {
819+
let ty::ConstKind::Infer(ty::InferConst::Var(vid)) = ct.kind() else {
820+
return false;
821+
};
818822
self.delegate.universe_of_ct(vid).unwrap()
819823
}
820-
_ => return false,
821824
};
822825

823826
struct ContainsTermOrNotNameable<'a, D: SolverDelegate<Interner = I>, I: Interner> {

0 commit comments

Comments
 (0)