aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/infer/pat.rs
diff options
context:
space:
mode:
authorGalilée 'Bill' Enguehard <[email protected]>2020-05-21 22:27:38 +0100
committerGalilée 'Bill' Enguehard <[email protected]>2020-05-21 22:27:38 +0100
commit7fece3bdd2450c0807f7dd742239cae95f0cc65e (patch)
tree866c4db826c959e79c63a6727bdb9f2c61e6fc4f /crates/ra_hir_ty/src/infer/pat.rs
parentdb926218b2082077750291f8426ddd28b284cd08 (diff)
parent59732df8d40dfadc6dcf5951265416576399712a (diff)
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer into modname_spacing
Diffstat (limited to 'crates/ra_hir_ty/src/infer/pat.rs')
-rw-r--r--crates/ra_hir_ty/src/infer/pat.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_ty/src/infer/pat.rs b/crates/ra_hir_ty/src/infer/pat.rs
index 54ec870df..4006f595d 100644
--- a/crates/ra_hir_ty/src/infer/pat.rs
+++ b/crates/ra_hir_ty/src/infer/pat.rs
@@ -10,7 +10,7 @@ use hir_def::{
10 FieldId, 10 FieldId,
11}; 11};
12use hir_expand::name::Name; 12use hir_expand::name::Name;
13use test_utils::tested_by; 13use test_utils::mark;
14 14
15use super::{BindingMode, Expectation, InferenceContext}; 15use super::{BindingMode, Expectation, InferenceContext};
16use crate::{utils::variant_data, Substs, Ty, TypeCtor}; 16use crate::{utils::variant_data, Substs, Ty, TypeCtor};
@@ -111,7 +111,7 @@ impl<'a> InferenceContext<'a> {
111 } 111 }
112 } 112 }
113 } else if let Pat::Ref { .. } = &body[pat] { 113 } else if let Pat::Ref { .. } = &body[pat] {
114 tested_by!(match_ergonomics_ref); 114 mark::hit!(match_ergonomics_ref);
115 // When you encounter a `&pat` pattern, reset to Move. 115 // When you encounter a `&pat` pattern, reset to Move.
116 // This is so that `w` is by value: `let (_, &w) = &(1, &2);` 116 // This is so that `w` is by value: `let (_, &w) = &(1, &2);`
117 default_bm = BindingMode::Move; 117 default_bm = BindingMode::Move;