diff options
author | Florian Diebold <[email protected]> | 2021-04-07 19:48:58 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-04-07 19:48:58 +0100 |
commit | be0084a0bc903544835d5c87df9eb9ce29a191d1 (patch) | |
tree | 104415f4dba0bbb2f47c566e53a218848451184c /crates/hir | |
parent | d1b645d2360fb6e74aaa774ff713af02f685a110 (diff) |
InEnvironment::new takes a reference
Diffstat (limited to 'crates/hir')
-rw-r--r-- | crates/hir/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 7ac9118fa..0afc06906 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs | |||
@@ -1791,7 +1791,7 @@ impl Type { | |||
1791 | .build(); | 1791 | .build(); |
1792 | 1792 | ||
1793 | let goal = Canonical { | 1793 | let goal = Canonical { |
1794 | value: hir_ty::InEnvironment::new(self.env.env.clone(), trait_ref.cast(&Interner)), | 1794 | value: hir_ty::InEnvironment::new(&self.env.env, trait_ref.cast(&Interner)), |
1795 | binders: CanonicalVarKinds::empty(&Interner), | 1795 | binders: CanonicalVarKinds::empty(&Interner), |
1796 | }; | 1796 | }; |
1797 | 1797 | ||
@@ -1810,7 +1810,7 @@ impl Type { | |||
1810 | .build(); | 1810 | .build(); |
1811 | let goal = hir_ty::make_canonical( | 1811 | let goal = hir_ty::make_canonical( |
1812 | InEnvironment::new( | 1812 | InEnvironment::new( |
1813 | self.env.env.clone(), | 1813 | &self.env.env, |
1814 | AliasEq { | 1814 | AliasEq { |
1815 | alias: AliasTy::Projection(projection), | 1815 | alias: AliasTy::Projection(projection), |
1816 | ty: TyKind::BoundVar(BoundVar::new(DebruijnIndex::INNERMOST, 0)) | 1816 | ty: TyKind::BoundVar(BoundVar::new(DebruijnIndex::INNERMOST, 0)) |