about summary refs log tree commit diff
path: root/compiler/rustc_infer/src/traits
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_infer/src/traits')
-rw-r--r--compiler/rustc_infer/src/traits/engine.rs15
-rw-r--r--compiler/rustc_infer/src/traits/project.rs8
2 files changed, 13 insertions, 10 deletions
diff --git a/compiler/rustc_infer/src/traits/engine.rs b/compiler/rustc_infer/src/traits/engine.rs
index 51282b900ed..1eae10673b6 100644
--- a/compiler/rustc_infer/src/traits/engine.rs
+++ b/compiler/rustc_infer/src/traits/engine.rs
@@ -45,12 +45,15 @@ pub trait TraitEngine<'tcx, E: 'tcx>: 'tcx {
         cause: ObligationCause<'tcx>,
     ) {
         let trait_ref = ty::TraitRef::new(infcx.tcx, def_id, [ty]);
-        self.register_predicate_obligation(infcx, Obligation {
-            cause,
-            recursion_depth: 0,
-            param_env,
-            predicate: trait_ref.upcast(infcx.tcx),
-        });
+        self.register_predicate_obligation(
+            infcx,
+            Obligation {
+                cause,
+                recursion_depth: 0,
+                param_env,
+                predicate: trait_ref.upcast(infcx.tcx),
+            },
+        );
     }
 
     fn register_predicate_obligation(
diff --git a/compiler/rustc_infer/src/traits/project.rs b/compiler/rustc_infer/src/traits/project.rs
index cab2ce9f5a0..9082db4f448 100644
--- a/compiler/rustc_infer/src/traits/project.rs
+++ b/compiler/rustc_infer/src/traits/project.rs
@@ -193,10 +193,10 @@ impl<'tcx> ProjectionCache<'_, 'tcx> {
                 if result.must_apply_considering_regions() {
                     ty.obligations = PredicateObligations::new();
                 }
-                map.insert(key, ProjectionCacheEntry::NormalizedTerm {
-                    ty,
-                    complete: Some(result),
-                });
+                map.insert(
+                    key,
+                    ProjectionCacheEntry::NormalizedTerm { ty, complete: Some(result) },
+                );
             }
             ref value => {
                 // Type inference could "strand behind" old cache entries. Leave