about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBoxy <supbscripter@gmail.com>2022-11-15 20:45:57 +0000
committerkadmin <julianknodt@gmail.com>2022-11-25 09:28:43 +0000
commitd75cd5c05111256a3c0d82d0df727cb2b52680b7 (patch)
treec1fdb42da9ff4855d7347bb6088c49a41b14f3aa
parent8c729bd0f3bc8726e50e05c0337d960ab4791a18 (diff)
downloadrust-d75cd5c05111256a3c0d82d0df727cb2b52680b7.tar.gz
rust-d75cd5c05111256a3c0d82d0df727cb2b52680b7.zip
fmt
-rw-r--r--compiler/rustc_trait_selection/src/traits/select/mod.rs34
1 files changed, 18 insertions, 16 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs
index 98b227940ff..6bf46bb9a1c 100644
--- a/compiler/rustc_trait_selection/src/traits/select/mod.rs
+++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs
@@ -671,22 +671,24 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
                     if let (ty::ConstKind::Unevaluated(_), ty::ConstKind::Unevaluated(_)) =
                         (c1.kind(), c2.kind())
                     {
-                        if let (Ok(Some(a)), Ok(Some(b))) = (
-                          tcx.expand_abstract_consts(c1),
-                          tcx.expand_abstract_consts(c2),
-                        ) && a.ty() == b.ty() && let Ok(new_obligations) =
-                                    self.infcx.at(&obligation.cause, obligation.param_env).eq(a, b)
-                                {
-                                    let mut obligations = new_obligations.obligations;
-                                    self.add_depth(
-                                        obligations.iter_mut(),
-                                        obligation.recursion_depth,
-                                    );
-                                    return self.evaluate_predicates_recursively(
-                                        previous_stack,
-                                        obligations.into_iter(),
-                                    );
-                                }
+                        if let Ok(Some(a)) = tcx.expand_abstract_consts(c1)
+                            && let Ok(Some(b)) = tcx.expand_abstract_consts(c2)
+                            && a.ty() == b.ty() 
+                            && let Ok(new_obligations) = self
+                                .infcx
+                                .at(&obligation.cause, obligation.param_env)
+                                .eq(a, b)
+                        {
+                            let mut obligations = new_obligations.obligations;
+                            self.add_depth(
+                                obligations.iter_mut(),
+                                obligation.recursion_depth,
+                            );
+                            return self.evaluate_predicates_recursively(
+                                previous_stack,
+                                obligations.into_iter(),
+                            );
+                        }
                     }
 
                     let evaluate = |c: ty::Const<'tcx>| {