diff options
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/ty/infer.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 92c79df15..3d0b7a827 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs | |||
@@ -681,12 +681,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
681 | let inner_ty = self.insert_type_vars_shallow(inner_ty); | 681 | let inner_ty = self.insert_type_vars_shallow(inner_ty); |
682 | 682 | ||
683 | let bound_ty = match mode { | 683 | let bound_ty = match mode { |
684 | BindingMode::Ref(Mutability::Shared) => { | 684 | BindingMode::Ref(mutability) => Ty::Ref(inner_ty.clone().into(), mutability), |
685 | Ty::Ref(inner_ty.clone().into(), Mutability::Shared) | ||
686 | } | ||
687 | BindingMode::Ref(Mutability::Mut) => { | ||
688 | Ty::Ref(inner_ty.clone().into(), Mutability::Mut) | ||
689 | } | ||
690 | BindingMode::Move => inner_ty.clone(), | 685 | BindingMode::Move => inner_ty.clone(), |
691 | }; | 686 | }; |
692 | let bound_ty = self.resolve_ty_as_possible(&mut vec![], bound_ty); | 687 | let bound_ty = self.resolve_ty_as_possible(&mut vec![], bound_ty); |