Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_ty/src/infer.rs')
| -rw-r--r-- | crates/hir_ty/src/infer.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/hir_ty/src/infer.rs b/crates/hir_ty/src/infer.rs index 95d9a6735a..54c3590f04 100644 --- a/crates/hir_ty/src/infer.rs +++ b/crates/hir_ty/src/infer.rs @@ -100,7 +100,7 @@ impl_from!(ExprId, PatId for ExprOrPatId); /// Binding modes inferred for patterns. /// <https://doc.rust-lang.org/reference/patterns.html#binding-modes> #[derive(Copy, Clone, Debug, Eq, PartialEq)] -enum BindingMode { +pub enum BindingMode { Move, Ref(Mutability), } @@ -292,6 +292,7 @@ pub struct InferenceResult { standard_types: InternedStandardTypes, /// Stores the types which were implicitly dereferenced in pattern binding modes. pub pat_adjustments: FxHashMap<PatId, Vec<Adjustment>>, + pub pat_binding_modes: FxHashMap<PatId, BindingMode>, pub expr_adjustments: FxHashMap<ExprId, Vec<Adjustment>>, } |