Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | | Merge #982 | bors[bot] | 2019-03-17 | 3 | -17/+137 | |
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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](https://github.com/rust-lang/rust/blob/e17c48e2f21eefd59748e364234efc7037a3ec96/src/librustc_typeck/check/_match.rs#L77) (and [definition of `BindingMode`](https://github.com/rust-lang/rust/blob/e957ed9d10ec589bdd523b88b4b44c41b1ecf763/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 <[email protected]> | |||||
| * | | | Split test case and use tested_by!. | Michael Killough | 2019-03-17 | 3 | -76/+103 | |
| | | | | ||||||
| * | | | Simplify match statement. | Michael Killough | 2019-03-17 | 1 | -6/+1 | |
| | | | | ||||||
| * | | | impl Default for BindingMode. | Michael Killough | 2019-03-17 | 1 | -5/+11 | |
| | | | | | | | | | | | | | | | | | | | | This decouples callers from knowing what the default binding mode of pattern matching is. | |||||
| * | | | Implement BindingMode for pattern matching. | Michael Killough | 2019-03-16 | 2 | -62/+154 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. | |||||
* | | | | Merge #983 | bors[bot] | 2019-03-17 | 3 | -0/+218 | |
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 983: support remainder assignment operator r=matklad a=JeanMertz `%=` was returning errors for me, turns out it wasn't added as a valid assignment operation. I'm not sure what the best location would be to add a test for this. Please let me know and I'll add one. Co-authored-by: Jean Mertz <[email protected]> | |||||
| * | | | | support remainder assignment operator | Jean Mertz | 2019-03-17 | 3 | -0/+218 | |
| | | | | | ||||||
* | | | | | Fix parse tree of attribute on match arm | pcpthm | 2019-03-17 | 4 | -133/+133 | |
| |_|/ / |/| | | | ||||||
* | | | | Merge #985 | bors[bot] | 2019-03-17 | 1 | -57/+56 | |
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 985: simplify parsing blocks a bit r=pcpthm a=matklad Co-authored-by: Aleksey Kladov <[email protected]> | |||||
| * | | | | simplify parsing blocks a bit | Aleksey Kladov | 2019-03-17 | 1 | -57/+56 | |
| | | | | | ||||||
* | | | | | Allow attribute on struct literal field | pcpthm | 2019-03-17 | 3 | -1/+54 | |
|/ / / / | ||||||
* | | | | docs | Aleksey Kladov | 2019-03-17 | 1 | -9/+15 | |
| | | | | ||||||
* | | | | remove fixme | Aleksey Kladov | 2019-03-17 | 1 | -2/+1 | |
| | | | | ||||||
* | | | | remove old macro support | Aleksey Kladov | 2019-03-17 | 8 | -261/+95 | |
| | | | | ||||||
* | | | | rename ModuleId -> CrateModuleId | Aleksey Kladov | 2019-03-17 | 8 | -39/+40 | |
| | | | | ||||||
* | | | | fix error on wrong path | Aleksey Kladov | 2019-03-17 | 4 | -12/+43 | |
| | | | | ||||||
* | | | | log time | Aleksey Kladov | 2019-03-17 | 1 | -0/+2 | |
| | | | | ||||||
* | | | | Reorganize name resolution | Aleksey Kladov | 2019-03-17 | 14 | -522/+481 | |
| | | | | ||||||
* | | | | hack around non-terminating macro expansion | Aleksey Kladov | 2019-03-17 | 1 | -0/+14 | |
| | | | | ||||||
* | | | | remove lower module | Aleksey Kladov | 2019-03-17 | 12 | -264/+48 | |
| | | | | ||||||
* | | | | remove ItemMap | Aleksey Kladov | 2019-03-17 | 7 | -569/+59 | |
| | | | | ||||||
* | | | | move tests over to crate-def-map | Aleksey Kladov | 2019-03-17 | 9 | -850/+689 | |
| | | | | ||||||
* | | | | Replace module_tree with CrateDefMap | Aleksey Kladov | 2019-03-17 | 16 | -511/+333 | |
| | | | | ||||||
* | | | | add name resolution from the old impl | Aleksey Kladov | 2019-03-17 | 9 | -185/+739 | |
| | | | | | | | | | | | | | | | | unlike the old impl, this also handles macro imports across crates | |||||
* | | | | add skeleton for macro-aware name resolutions | Aleksey Kladov | 2019-03-17 | 8 | -9/+773 | |
| | | | | ||||||
* | | | | Move the primary assist fn to the top of the file | Igor Matuszewski | 2019-03-16 | 1 | -30/+30 | |
| | | | | ||||||
* | | | | Provide assist when cursor is immediately outside impl item block | Igor Matuszewski | 2019-03-16 | 1 | -14/+18 | |
| | | | | ||||||
* | | | | Do a cleanup/legibility pass | Igor Matuszewski | 2019-03-16 | 1 | -21/+21 | |
| | | | | ||||||
* | | | | Take into account parent indent when filling trait members | Igor Matuszewski | 2019-03-16 | 1 | -9/+41 | |
| | | | | ||||||
* | | | | Simplify trait resolution fragment | Igor Matuszewski | 2019-03-16 | 1 | -6/+3 | |
| | | | | ||||||
* | | | | Ignore unnamed trait fns and add more tests | Igor Matuszewski | 2019-03-16 | 1 | -2/+70 | |
| | | | | ||||||
* | | | | Simplify calculation of missing functions | Igor Matuszewski | 2019-03-16 | 1 | -9/+2 | |
| | | | | | | | | | | | | | | | | | | | | | | | | Asymptotically computing a set difference is faster but in the average case we won't have more than ~10 functions. Also prefer not using hash sets as these may yield nondeterministic results. | |||||
* | | | | Properly support the case when the cursor is inside an empty block or outside | Igor Matuszewski | 2019-03-16 | 1 | -15/+44 | |
| | | | | ||||||
* | | | | Redo indent calculation when adding missing impl members | Igor Matuszewski | 2019-03-16 | 1 | -9/+21 | |
| | | | | ||||||
* | | | | Implement a simple working assist | Igor Matuszewski | 2019-03-16 | 1 | -13/+59 | |
| | | | | ||||||
* | | | | Calculate missing functions from impl body | Igor Matuszewski | 2019-03-16 | 1 | -1/+62 | |
| | | | | ||||||
* | | | | Add 'add_missing_impl_members' assist stub | Igor Matuszewski | 2019-03-16 | 2 | -0/+43 | |
|/ / / | ||||||
* | | | Remove FnSig from FnDef type | Florian Diebold | 2019-03-16 | 4 | -21/+26 | |
| | | | | | | | | | | | | | | | It doesn't need to be in there since it's just information from the def. Another step towards aligning Ty with Chalk's representation. | |||||
* | | | Refactor FnSig a bit | Florian Diebold | 2019-03-16 | 3 | -70/+104 | |
| | | | ||||||
* | | | Some more Ty displaying cleanup | Florian Diebold | 2019-03-16 | 2 | -35/+33 | |
| | | | ||||||
* | | | Replace Display by a pretty printing trait for Ty | Florian Diebold | 2019-03-16 | 7 | -60/+136 | |
| |/ |/| | | | | | | | This allows removing the names from Adt and FnDef (and more later), as a first step towards aligning more with chalk's Ty :) | |||||
* | | sort navigations to make tests stable | Aleksey Kladov | 2019-03-14 | 1 | -1/+2 | |
| | | ||||||
* | | Add test for minus in inner pattern | Michael Chesser | 2019-03-14 | 2 | -0/+347 | |
| | | ||||||
* | | Allow MINUS at the start of a pattern. | Michael Chesser | 2019-03-14 | 1 | -1/+1 | |
| | | ||||||
* | | derive Hash for ra_hir::ModuleDef | pcpthm | 2019-03-14 | 1 | -1/+1 | |
|/ | ||||||
* | Merge #958 | bors[bot] | 2019-03-12 | 1 | -0/+2 | |
|\ | | | | | | | | | | | | | | | 958: LSP: Support EnumMember and Field r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]> | |||||
| * | LSP: Support EnumMember and Field | kjeremy | 2019-03-11 | 1 | -0/+2 | |
| | | ||||||
* | | remove Def | Aleksey Kladov | 2019-03-12 | 2 | -6/+0 | |
|/ | ||||||
* | Add test for async block | Caio | 2019-03-10 | 3 | -1/+34 | |
| | ||||||
* | Add async keyword | Caio | 2019-03-09 | 8 | -2/+39 | |
| |