aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
* Merge #987bors[bot]2019-03-182-84/+70
|\ | | | | | | | | | | | | | | | | | | | | | | 987: Refactor maybe_item to use Marker argument r=pcpthm a=pcpthm As suggested at <https://github.com/rust-analyzer/rust-analyzer/pull/980#issuecomment-473659745>. For expression paring functions, changing signature - from `fn(&mut Parser) -> Option<CompletedMarker>` to `fn(&mut Parser, Marker) -> Result<CompletedMarker, Marker>` - from `fn(&mut Parser) -> CompletedMarker` to `fn(&mut Parser, Marker) -> CompletedMarker` is my plan. Co-authored-by: pcpthm <[email protected]>
| * Apply stylistic changes suggestedpcpthm2019-03-182-17/+14
| |
| * Refactor maybe_item to use Marker argumentpcpthm2019-03-172-86/+75
| |
* | Merge #982bors[bot]2019-03-173-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 Killough2019-03-173-76/+103
| | |
| * | Simplify match statement.Michael Killough2019-03-171-6/+1
| | |
| * | impl Default for BindingMode.Michael Killough2019-03-171-5/+11
| | | | | | | | | | | | | | | This decouples callers from knowing what the default binding mode of pattern matching is.
| * | Implement BindingMode for pattern matching.Michael Killough2019-03-162-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 #983bors[bot]2019-03-173-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 operatorJean Mertz2019-03-173-0/+218
| | | |
* | | | Fix parse tree of attribute on match armpcpthm2019-03-174-133/+133
| |_|/ |/| |
* | | Merge #985bors[bot]2019-03-171-57/+56
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 985: simplify parsing blocks a bit r=pcpthm a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | simplify parsing blocks a bitAleksey Kladov2019-03-171-57/+56
| | | |
* | | | Allow attribute on struct literal fieldpcpthm2019-03-173-1/+54
|/ / /
* | | docsAleksey Kladov2019-03-171-9/+15
| | |
* | | remove fixmeAleksey Kladov2019-03-171-2/+1
| | |
* | | remove old macro supportAleksey Kladov2019-03-178-261/+95
| | |
* | | rename ModuleId -> CrateModuleIdAleksey Kladov2019-03-178-39/+40
| | |
* | | fix error on wrong pathAleksey Kladov2019-03-174-12/+43
| | |
* | | log timeAleksey Kladov2019-03-171-0/+2
| | |
* | | Reorganize name resolutionAleksey Kladov2019-03-1714-522/+481
| | |
* | | hack around non-terminating macro expansionAleksey Kladov2019-03-171-0/+14
| | |
* | | remove lower moduleAleksey Kladov2019-03-1712-264/+48
| | |
* | | remove ItemMapAleksey Kladov2019-03-177-569/+59
| | |
* | | move tests over to crate-def-mapAleksey Kladov2019-03-179-850/+689
| | |
* | | Replace module_tree with CrateDefMapAleksey Kladov2019-03-1716-511/+333
| | |
* | | add name resolution from the old implAleksey Kladov2019-03-179-185/+739
| | | | | | | | | | | | unlike the old impl, this also handles macro imports across crates
* | | add skeleton for macro-aware name resolutionsAleksey Kladov2019-03-178-9/+773
| | |
* | | Move the primary assist fn to the top of the fileIgor Matuszewski2019-03-161-30/+30
| | |
* | | Provide assist when cursor is immediately outside impl item blockIgor Matuszewski2019-03-161-14/+18
| | |
* | | Do a cleanup/legibility passIgor Matuszewski2019-03-161-21/+21
| | |
* | | Take into account parent indent when filling trait membersIgor Matuszewski2019-03-161-9/+41
| | |
* | | Simplify trait resolution fragmentIgor Matuszewski2019-03-161-6/+3
| | |
* | | Ignore unnamed trait fns and add more testsIgor Matuszewski2019-03-161-2/+70
| | |
* | | Simplify calculation of missing functionsIgor Matuszewski2019-03-161-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 outsideIgor Matuszewski2019-03-161-15/+44
| | |
* | | Redo indent calculation when adding missing impl membersIgor Matuszewski2019-03-161-9/+21
| | |
* | | Implement a simple working assistIgor Matuszewski2019-03-161-13/+59
| | |
* | | Calculate missing functions from impl bodyIgor Matuszewski2019-03-161-1/+62
| | |
* | | Add 'add_missing_impl_members' assist stubIgor Matuszewski2019-03-162-0/+43
|/ /
* | Remove FnSig from FnDef typeFlorian Diebold2019-03-164-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 bitFlorian Diebold2019-03-163-70/+104
| |
* | Some more Ty displaying cleanupFlorian Diebold2019-03-162-35/+33
| |
* | Replace Display by a pretty printing trait for TyFlorian Diebold2019-03-167-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 stableAleksey Kladov2019-03-141-1/+2
| |
* | Add test for minus in inner patternMichael Chesser2019-03-142-0/+347
| |
* | Allow MINUS at the start of a pattern.Michael Chesser2019-03-141-1/+1
| |
* | derive Hash for ra_hir::ModuleDefpcpthm2019-03-141-1/+1
|/
* Merge #958bors[bot]2019-03-121-0/+2
|\ | | | | | | | | | | | | | | 958: LSP: Support EnumMember and Field r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * LSP: Support EnumMember and Fieldkjeremy2019-03-111-0/+2
| |