aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge #2633bors[bot]2019-12-218-45/+22
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2633: Remove imports from hir r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Remove imports from hirAleksey Kladov2019-12-218-45/+22
| | | |
* | | | Merge #2632bors[bot]2019-12-2113-71/+166
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2632: Revert "Merge #2629" r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Revert "Merge #2629"Aleksey Kladov2019-12-2113-71/+166
|/ / / | | | | | | | | | | | | This reverts commit cdc9d682b066b110e0a44e5f8f1c574b38c16ba9, reversing changes made to 90ef070db3dce0a7acb9cd11d0b0d72de13c9d79.
* | | Merge #2630bors[bot]2019-12-213-43/+99
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2630: Add dummy implementations of env! and option_env! builtins r=matklad a=flodiebold They don't do anything except return the correct type. Also refactor the builtin macro tests a bit. Co-authored-by: Florian Diebold <[email protected]>
| * | | Add dummy implementations of env! and option_env! builtinsFlorian Diebold2019-12-213-43/+99
|/ / / | | | | | | | | | | | | | | | They don't do anything except return the correct type. Also refactor the builtin macro tests a bit.
* | | Merge #2629bors[bot]2019-12-2113-166/+71
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | 2629: Remove imports from hir r=matklad a=matklad We only used them to avoid self-confirming completions (`use self::foo`), but that can be handled more locally. bors r+ Co-authored-by: Aleksey Kladov <[email protected]>
| * | Privatize LocalImportIDAleksey Kladov2019-12-213-11/+8
| | |
| * | Remove import source mapAleksey Kladov2019-12-215-72/+15
| | |
| * | Don't track importsAleksey Kladov2019-12-212-48/+26
| | |
| * | Remove hir for importsAleksey Kladov2019-12-215-36/+23
| | |
* | | Merge #2628bors[bot]2019-12-2110-331/+279
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2628: Add macro 2.0 support in parser r=matklad a=edwin0cheng This PR added a new syntax kind : `MACRO_DEF` and a keyword `MACRO_KW` there are two syntax for declarative macro 2.0 : 1. Normal : `macro m { ($i:ident) => {} }` , which handle similar to legacy one. 2. Call like: `macro m($i:ident) {}`, it produces a single token tree which have two child token trees : `($i:ident)` and `{}` Co-authored-by: Edwin Cheng <[email protected]>
| * | Add macro keyword to ITEM_RECOVERY_SETEdwin Cheng2019-12-211-1/+1
| | |
| * | Add macro 2.0 support in parserEdwin Cheng2019-12-2110-330/+278
| | |
* | | Merge #2626bors[bot]2019-12-212-10/+59
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2626: Recursive collect macros in impl items r=matklad a=edwin0cheng Co-authored-by: Edwin Cheng <[email protected]>
| * | | Add a limit for protect against infinite recursionEdwin Cheng2019-12-201-2/+10
| | | |
| * | | Recursive collect macros in impl itemsEdwin Cheng2019-12-202-10/+51
| |/ /
* | | Merge #2627bors[bot]2019-12-214-33/+13
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2627: Use SelectionRange from LSP 3.15 r=matklad a=kjeremy Co-authored-by: Jeremy Kolb <[email protected]>
| * | | Use SelectionRange from LSP 3.15Jeremy Kolb2019-12-204-33/+13
| |/ /
* | | Merge #2625bors[bot]2019-12-2116-80/+70
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | 2625: Clippy lints r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * | Clippy lintskjeremy2019-12-2016-80/+70
| | |
* | | Merge #2624bors[bot]2019-12-2015-178/+210
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2624: Separate module item from module scope r=matklad a=matklad bors r+ Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Make legacy macros privateAleksey Kladov2019-12-204-19/+24
| | | |
| * | | Privitize implsAleksey Kladov2019-12-204-6/+12
| | | |
| * | | Make items privateAleksey Kladov2019-12-202-46/+42
| | | |
| * | | Move some code to scopeAleksey Kladov2019-12-202-26/+37
| | | |
| * | | Fix typosAleksey Kladov2019-12-201-2/+2
| | | |
| * | | Move impls to ItemScopeAleksey Kladov2019-12-2010-13/+16
| | | |
| * | | Reduce visibilityAleksey Kladov2019-12-201-6/+6
| | | |
| * | | Rename ModuleScope -> ItemScopeAleksey Kladov2019-12-202-4/+4
| | | |
| * | | DocsAleksey Kladov2019-12-201-3/+6
| | | |
| * | | Move ModuleScope to a new moduleAleksey Kladov2019-12-205-108/+114
| | | |
| * | | Add item_scope moduleAleksey Kladov2019-12-202-0/+2
| | | |
* | | | Merge #2623bors[bot]2019-12-205-48/+114
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2623: Add support macros in impl blocks r=matklad a=edwin0cheng This PR add support for macros in impl blocks, which reuse `Expander` for macro expansion. see also: #2459 Co-authored-by: Edwin Cheng <[email protected]>
| * | | | Add support macros in impl blocksEdwin Cheng2019-12-205-48/+114
| |/ / /
* | | | Merge #2622bors[bot]2019-12-201-1/+1
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | 2622: Simplify r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | SimplifyAleksey Kladov2019-12-201-1/+1
| | | |
* | | | Merge #2620bors[bot]2019-12-203-35/+40
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | 2620: Update packages r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * | | Protect against null as revealed by `npm test`kjeremy2019-12-201-2/+7
| | | |
| * | | Update to latest packageskjeremy2019-12-202-33/+33
|/ / /
* | | Merge #2617bors[bot]2019-12-202-59/+23
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2617: Remove index resolving from hover r=matklad a=kjeremy I have left in `HoverResult`'s support for multiple entries because we may still want that at some point. Per https://github.com/rust-analyzer/rust-analyzer/issues/2542#issuecomment-565238142 Co-authored-by: kjeremy <[email protected]>
| * | | Remove unused importskjeremy2019-12-201-1/+1
| | | |
| * | | Remove the index resolution from hoverkjeremy2019-12-201-58/+22
| | | | | | | | | | | | | | | | We are reasonably precise now to do this.
* | | | Merge #2619bors[bot]2019-12-203-5/+48
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2619: Coerce closures to fn pointers r=flodiebold a=flodiebold E.g. `let x: fn(A) -> B = |x| { y };` Co-authored-by: Florian Diebold <[email protected]>
| * | | | Coerce closures to fn pointersFlorian Diebold2019-12-203-5/+48
|/ / / / | | | | | | | | | | | | E.g. `let x: fn(A) -> B = |x| { y };`
* | | | Merge #2618bors[bot]2019-12-203-2/+18
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2618: Fix coercion of last expression in function body r=flodiebold a=flodiebold Co-authored-by: Florian Diebold <[email protected]>
| * | | | Fix coercion of last expression in function bodyFlorian Diebold2019-12-203-2/+18
|/ / / /
* | | | Merge #2616bors[bot]2019-12-208-6/+113
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | 2616: Handle closure return types r=flodiebold a=flodiebold Fixes #2547. Co-authored-by: Florian Diebold <[email protected]>
| * | | Handle closure return typesFlorian Diebold2019-12-208-6/+113
|/ / / | | | | | | | | | Fixes #2547.
* | | Merge #2615bors[bot]2019-12-203-6/+41
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2615: Fix wrong path parsing for macro call in pattern position r=edwin0cheng a=edwin0cheng The parser incorrectly insert a `PathPat` inside `MacroCall` syntax node when parsing inside a pattern position, for example : ```rust let foo!() = 0; ``` become: ``` MACRO_CALL@[60; 66) PATH_PAT@[60; 63) <------------- It should not exist PATH@[60; 63) PATH_SEGMENT@[60; 63) NAME_REF@[60; 63) IDENT@[60; 63) "foo" EXCL@[63; 64) "!" TOKEN_TREE@[64; 66) L_PAREN@[64; 65) "(" R_PAREN@[65; 66) ")" ``` This PR fix this bug and add some test to make sure goto-defintion works for macro inside pattern. Co-authored-by: Edwin Cheng <[email protected]>