mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-20 00:54:45 +00:00
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]( |
||
---|---|---|
.. | ||
autoderef.rs | ||
display.rs | ||
infer.rs | ||
lower.rs | ||
method_resolution.rs | ||
op.rs | ||
primitive.rs | ||
tests.rs |