rust/crates
bors[bot] 40c6dd1f4c Merge #982
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](e17c48e2f2/src/librustc_typeck/check/_match.rs (L77)) (and [definition of `BindingMode`](e957ed9d10/src/librustc/ty/binding.rs))
 - [Match Ergonomics RFC](https://github.com/rust-lang/rfcs/blob/master/text/2005-match-ergonomics.md#binding-mode-rules)

Co-authored-by: Michael Killough <michaeljkillough@gmail.com>
2019-03-17 21:41:37 +00:00
..
gen_lsp_server show message in client's UI if workspace fails to load 2019-03-05 16:33:05 +03:00
ra_arena
ra_assists Move the primary assist fn to the top of the file 2019-03-16 23:24:17 +01:00
ra_batch Rename and change add_roots to return a Vec. 2019-03-07 01:05:07 +01:00
ra_cli Updates 2019-03-05 10:26:36 -05:00
ra_db add skeleton for macro-aware name resolutions 2019-03-17 12:46:13 +03:00
ra_fmt
ra_hir Merge #982 2019-03-17 21:41:37 +00:00
ra_ide_api remove old macro support 2019-03-17 12:53:22 +03:00
ra_ide_api_light Updates 2019-03-05 10:26:36 -05:00
ra_lsp_server LSP: Support EnumMember and Field 2019-03-11 13:58:38 -04:00
ra_mbe hack around non-terminating macro expansion 2019-03-17 12:52:52 +03:00
ra_parser Merge #983 2019-03-17 14:34:14 +00:00
ra_project_model Specify derive feature for serde 2019-03-08 01:58:29 +09:00
ra_syntax Merge #983 2019-03-17 14:34:14 +00:00
ra_text_edit
ra_tt
test_utils fix error on wrong path 2019-03-17 12:53:22 +03:00
thread_worker
tools Check installed extension 2019-03-05 18:19:36 -03:00