40c6dd1f4c
982: Implement BindingMode for pattern matching. r=flodiebold a=mjkillough Implement `BindingMode` for pattern matching, so that types can be correctly inferred using match ergonomics. The binding mode defaults to `Move` (referred to as 'BindingMode::BindByValue` in rustc), and is updated by automatic dereferencing of the value being matched. Fixes #888. - [Binding modes in The Reference](https://doc.rust-lang.org/reference/patterns.html#binding-modes) - [`rustc` implementation]( |
||
---|---|---|
.. | ||
code_model_impl | ||
expr | ||
nameres | ||
ty | ||
adt.rs | ||
code_model_api.rs | ||
code_model_impl.rs | ||
db.rs | ||
docs.rs | ||
expr.rs | ||
generics.rs | ||
ids.rs | ||
impl_block.rs | ||
lib.rs | ||
marks.rs | ||
mock.rs | ||
module_tree.rs | ||
name.rs | ||
nameres.rs | ||
path.rs | ||
resolve.rs | ||
source_binder.rs | ||
ty.rs | ||
type_alias.rs | ||
type_ref.rs |