From be0084a0bc903544835d5c87df9eb9ce29a191d1 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Wed, 7 Apr 2021 20:48:58 +0200 Subject: InEnvironment::new takes a reference --- crates/hir_ty/src/infer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/hir_ty/src/infer.rs') diff --git a/crates/hir_ty/src/infer.rs b/crates/hir_ty/src/infer.rs index 6af0c59b8..531159e54 100644 --- a/crates/hir_ty/src/infer.rs +++ b/crates/hir_ty/src/infer.rs @@ -336,7 +336,7 @@ impl<'a> InferenceContext<'a> { self.last_obligations_check = Some(self.table.revision); let obligations = mem::replace(&mut self.obligations, Vec::new()); for obligation in obligations { - let in_env = InEnvironment::new(self.trait_env.env.clone(), obligation.clone()); + let in_env = InEnvironment::new(&self.trait_env.env, obligation.clone()); let canonicalized = self.canonicalizer().canonicalize_obligation(in_env); let solution = self.db.trait_solve(self.resolver.krate().unwrap(), canonicalized.value.clone()); -- cgit v1.2.3