aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/infer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty/infer.rs')
-rw-r--r--crates/ra_hir/src/ty/infer.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs
index 8322de0a8..a23daabc2 100644
--- a/crates/ra_hir/src/ty/infer.rs
+++ b/crates/ra_hir/src/ty/infer.rs
@@ -85,7 +85,7 @@ enum BindingMode {
85} 85}
86 86
87impl BindingMode { 87impl BindingMode {
88 pub fn convert(annotation: &BindingAnnotation) -> BindingMode { 88 pub fn convert(annotation: BindingAnnotation) -> BindingMode {
89 match annotation { 89 match annotation {
90 BindingAnnotation::Unannotated | BindingAnnotation::Mutable => BindingMode::Move, 90 BindingAnnotation::Unannotated | BindingAnnotation::Mutable => BindingMode::Move,
91 BindingAnnotation::Ref => BindingMode::Ref(Mutability::Shared), 91 BindingAnnotation::Ref => BindingMode::Ref(Mutability::Shared),
@@ -778,7 +778,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
778 let mode = if mode == &BindingAnnotation::Unannotated { 778 let mode = if mode == &BindingAnnotation::Unannotated {
779 default_bm 779 default_bm
780 } else { 780 } else {
781 BindingMode::convert(mode) 781 BindingMode::convert(*mode)
782 }; 782 };
783 let inner_ty = if let Some(subpat) = subpat { 783 let inner_ty = if let Some(subpat) = subpat {
784 self.infer_pat(*subpat, expected, default_bm) 784 self.infer_pat(*subpat, expected, default_bm)