From a48c08546cbbace9efc1e19ec56ed8fa7885435d Mon Sep 17 00:00:00 2001 From: lcnr Date: Wed, 11 Jun 2025 12:13:57 +0200 Subject: [PATCH] move fast reject into inner to also fast reject inside of the folder --- compiler/rustc_type_ir/src/fast_reject.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_type_ir/src/fast_reject.rs b/compiler/rustc_type_ir/src/fast_reject.rs index 34502f4955003..135a924e810fd 100644 --- a/compiler/rustc_type_ir/src/fast_reject.rs +++ b/compiler/rustc_type_ir/src/fast_reject.rs @@ -232,9 +232,6 @@ impl bool { - if lhs == rhs { - return true; - } self.types_may_unify_inner(lhs, rhs, Self::STARTING_DEPTH) } @@ -263,6 +260,10 @@ impl bool { + if lhs == rhs { + return true; + } + match rhs.kind() { // Start by checking whether the `rhs` type may unify with // pretty much everything. Just return `true` in that case.