aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-04-07 19:48:58 +0100
committerFlorian Diebold <[email protected]>2021-04-07 19:48:58 +0100
commitbe0084a0bc903544835d5c87df9eb9ce29a191d1 (patch)
tree104415f4dba0bbb2f47c566e53a218848451184c /crates/hir_ty/src/infer
parentd1b645d2360fb6e74aaa774ff713af02f685a110 (diff)
InEnvironment::new takes a reference
Diffstat (limited to 'crates/hir_ty/src/infer')
-rw-r--r--crates/hir_ty/src/infer/coerce.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_ty/src/infer/coerce.rs b/crates/hir_ty/src/infer/coerce.rs
index f1af2a0bd..fd679f444 100644
--- a/crates/hir_ty/src/infer/coerce.rs
+++ b/crates/hir_ty/src/infer/coerce.rs
@@ -139,7 +139,7 @@ impl<'a> InferenceContext<'a> {
139 b.push(from_ty.clone()).push(to_ty.clone()).build() 139 b.push(from_ty.clone()).push(to_ty.clone()).build()
140 }; 140 };
141 141
142 let goal = InEnvironment::new(self.trait_env.env.clone(), trait_ref.cast(&Interner)); 142 let goal = InEnvironment::new(&self.trait_env.env, trait_ref.cast(&Interner));
143 143
144 let canonicalizer = self.canonicalizer(); 144 let canonicalizer = self.canonicalizer();
145 let canonicalized = canonicalizer.canonicalize_obligation(goal); 145 let canonicalized = canonicalizer.canonicalize_obligation(goal);