aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | Merge #4034bors[bot]2020-04-187-21/+34
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| / / / / / / | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4034: Add semantic tag for unresolved references r=matklad a=matklad This is a quick way to implement unresolved reference diagnostics. For example, adding to VS Code config "editor.tokenColorCustomizationsExperimental": { "unresolvedReference": "#FF0000" }, will highlight all unresolved refs in red. Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | | Add semantic tag for unresolved referencesAleksey Kladov2020-04-187-21/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a quick way to implement unresolved reference diagnostics. For example, adding to VS Code config "editor.tokenColorCustomizationsExperimental": { "unresolvedReference": "#FF0000" }, will highlight all unresolved refs in red.
* | | | | | | Merge #4032bors[bot]2020-04-181-0/+27
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4032: Add mbe lifetime split test r=matklad a=edwin0cheng Co-authored-by: Edwin Cheng <[email protected]>
| * | | | | | Add mbe lifetime split testEdwin Cheng2020-04-181-0/+27
| | | | | | |
* | | | | | | Merge #4033bors[bot]2020-04-181-6/+6
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4033: Refactor codegen r=matklad a=Veetaha Co-authored-by: veetaha <[email protected]>
| * | | | | | | Refucktor codegenveetaha2020-04-181-6/+6
| |/ / / / / /
* | | | | | | Merge #3894bors[bot]2020-04-182-41/+331
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3894: Match check enum record r=flodiebold a=JoshMcguigan This PR implements match statement exhaustiveness checking for record type enums. It also make a minor addition to the test infrastructure to allow testing against a single diagnostic, so you can be sure your test is triggering (or not) whichever diagnostic you expect. Co-authored-by: Josh Mcguigan <[email protected]>
| * | | | | | missing match arm diagnostic support enum record typeJosh Mcguigan2020-04-182-41/+331
| |/ / / / /
* | | | | | Merge #4029bors[bot]2020-04-187-17/+117
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4029: Fix various proc-macro bugs r=matklad a=edwin0cheng This PRs does the following things: 1. Fixed #4001 by splitting `LIFETIME` lexer token to two mbe tokens. It is because rustc token stream expects `LIFETIME` as a combination of punct and ident, but RA `tt:TokenTree` treats it as a single `Ident` previously. 2. Fixed #4003, by skipping `proc-macro` for completion. It is because currently we don't have `AstNode` for `proc-macro`. We would need to redesign how to implement `HasSource` for `proc-macro`. 3. Fixed a bug how empty `TokenStream` merging in `proc-macro-srv` such that no L_DOLLAR and R_DOLLAR will be emitted accidentally. Co-authored-by: Edwin Cheng <[email protected]>
| * | | | | Merge empty delim subtree in proc-macroEdwin Cheng2020-04-182-3/+11
| | | | | |
| * | | | | Split LIFETIME to two tokens in mbeEdwin Cheng2020-04-183-14/+89
| | | | | |
| * | | | | Ignore proc-macro in completionEdwin Cheng2020-04-182-0/+17
| | | | | |
* | | | | | Merge #4027bors[bot]2020-04-182-25/+50
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4027: find_path: Builtins are always in scope r=matklad a=flodiebold Fixes #3977. Co-authored-by: Florian Diebold <[email protected]>
| * | | | | | find_path: Builtins are always in scopeFlorian Diebold2020-04-182-25/+50
|/ / / / / / | | | | | | | | | | | | | | | | | | Fixes #3977.
* | | | | | Merge #4026bors[bot]2020-04-181-1/+10
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4026: Omit more parameter hints in the presence of underscores r=matklad a=lnicola Fixes #4017. Co-authored-by: Laurențiu Nicola <[email protected]>
| * | | | | | Omit more parameter hints in the presence of underscoresLaurențiu Nicola2020-04-181-1/+10
| |/ / / / /
* | | | | | Merge #4023bors[bot]2020-04-184-27/+92
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4023: Fix another crash from wrong binders r=matklad a=flodiebold Basically, if we had something like `dyn Trait<T>` (where `T` is a type parameter) in an impl we lowered that to `dyn Trait<^0.0>`, when it should be `dyn Trait<^1.0>` because the `dyn` introduces a new binder. With one type parameter, that's just wrong, with two, it'll lead to crashes. Co-authored-by: Florian Diebold <[email protected]>
| * | | | | | Fix another crash from wrong bindersFlorian Diebold2020-04-174-27/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basically, if we had something like `dyn Trait<T>` (where `T` is a type parameter) in an impl we lowered that to `dyn Trait<^0.0>`, when it should be `dyn Trait<^1.0>` because the `dyn` introduces a new binder. With one type parameter, that's just wrong, with two, it'll lead to crashes.
* | | | | | | Merge #4022bors[bot]2020-04-172-1/+14
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4022: Fix incorrect order of syntax highlight ranges r=ltentrup a=ltentrup A fix for the bug #4013 which is caused by a difference between tree traversal order and text representation order. In the case of #4013, the attributes of a macro were visited after the macro definition which caused the syntax highlight ranges to be in wrong order. The fix is to sort the ranges before returning. Co-authored-by: Leander Tentrup <[email protected]>
| * | | | | | | Fix incorrect order of syntax highlight rangesLeander Tentrup2020-04-172-1/+14
|/ / / / / / /
* | | | | | | Merge #4021bors[bot]2020-04-173-5/+65
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4021: Fix type equality for dyn Trait r=matklad a=flodiebold Fixes a lot of false type mismatches. (And as always when touching the unification code, I have to say I'm looking forward to replacing it by Chalk's...) Co-authored-by: Florian Diebold <[email protected]>
| * | | | | | | Fix type equality for dyn TraitFlorian Diebold2020-04-173-5/+65
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a lot of false type mismatches. (And as always when touching the unification code, I have to say I'm looking forward to replacing it by Chalk's...)
* | | | | | | Merge #4019bors[bot]2020-04-171-0/+174
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4019: Add two more tests for associated types r=matklad a=flodiebold Co-authored-by: Florian Diebold <[email protected]>
| * | | | | | | Add two more tests for associated typesFlorian Diebold2020-04-171-0/+174
|/ / / / / / /
* | | | | | | Merge #4016bors[bot]2020-04-171-47/+52
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4016: Don't use SyntaxNodePtr::range when determining scope for offset r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | | Don't use SyntaxNodePtr::range when determining scope for offsetAleksey Kladov2020-04-171-47/+52
|/ / / / / /
* | | | | | Merge #4012bors[bot]2020-04-172-3/+59
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4012: fix panic on ellipsis in pattern r=flodiebold a=JoshMcguigan fixes #3999 Co-authored-by: Josh Mcguigan <[email protected]>
| * | | | | | fix panic on ellipsis in patternJosh Mcguigan2020-04-172-3/+59
| | |_|_|_|/ | |/| | | |
* | | | | | Merge #4011bors[bot]2020-04-172-1/+40
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4011: Don\t suggest import itself as a completion for import r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | | Don\t suggest import itself as a completion for importAleksey Kladov2020-04-172-1/+40
|/ / / / / /
* | | | | | Merge #4010bors[bot]2020-04-178-17/+83
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4010: Fix handling of ranges in diagnostics r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | | Simplify Diagnostic structureAleksey Kladov2020-04-176-51/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not entirely clear what subnode ranges should mean in the presence of macros, so let's leave them out for now. We are not using them heavily anyway.
| * | | | | | Correctly highlight ranges of diagnostics from macrosAleksey Kladov2020-04-175-21/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | closes #2799
| * | | | | | Don't expose impl details of SyntaxPtrAleksey Kladov2020-04-178-14/+55
| | | | | | |
* | | | | | | Merge #4009bors[bot]2020-04-171-9/+10
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4009: Better snippet when completing trait method r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | | | Better snippet when completing trait methodAleksey Kladov2020-04-171-9/+10
| |/ / / / / /
* | | | | | | Merge #4004bors[bot]2020-04-173-2/+17
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4004: Use mmap for proc macro libs r=matklad a=lnicola Fixes #4002. Co-authored-by: Laurențiu Nicola <[email protected]>
| * | | | | | | Use mmap for proc macro libsLaurențiu Nicola2020-04-173-2/+17
| |/ / / / / /
* | | | | | | Merge #3996bors[bot]2020-04-172-6/+2
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3996: Fix path for proc-macro in nightly / stable release r=matklad a=edwin0cheng I messed up that I forget we use different executable names for nightly / stable release, I changed to use the current executable name instead. Co-authored-by: Edwin Cheng <[email protected]>
| * | | | | | Fix path for proc-macro in nightly / stable buildEdwin Cheng2020-04-162-6/+2
| | | | | | |
* | | | | | | Merge #4008bors[bot]2020-04-171-3/+3
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4008: tests: add more info about what failed in tidy tests r=matklad a=bnjjj Separate PR from #3954 Co-authored-by: Benjamin Coenen <[email protected]>
| * | | | | | | tests: add more info about what failed in tidy testsBenjamin Coenen2020-04-171-3/+3
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
* | | | | | | Merge #4007bors[bot]2020-04-171-37/+35
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4007: Reduce allocations when looking up proc macro decl r=edwin0cheng a=lnicola `libserde_derive` has about 21K symbols on Linux. It's not much, but let's ~~not be wasteful~~ avoid the allocations anyway. r? @edwin0cheng Co-authored-by: Laurențiu Nicola <[email protected]>
| * | | | | | Reduce allocations when looking up proc macro declLaurențiu Nicola2020-04-171-37/+35
|/ / / / / /
* | | | | | Merge #3995bors[bot]2020-04-163-149/+150
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3995: Separate project discovery from project loading r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | Unmix error handling when discovering workspacesAleksey Kladov2020-04-163-75/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hitting an io::Error is a legit problem. Finding more than one Cargo.toml is not.
| * | | | | Decouple project loading from project discovery a bitAleksey Kladov2020-04-163-128/+163
| | | | | |
* | | | | | Merge #3958bors[bot]2020-04-1617-29/+208
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3958: Add proc-macro related config and tests r=matklad a=edwin0cheng This PR do the following things: 1. Add cli argument `proc-macro` for running proc-macro server. 2. Added support for proc-macro in bench and analysis-stats 3. Added typescript config for proc-macros 4. Added an heavy test for proc-macros. To test it out: 1. run `cargo xtask install --proc-macro` 2. add `"rust-analyzer.cargo.loadOutDirsFromCheck": true"` and `"rust-analyzer.procMacro.enabled": true"` in vs code config. [Edit] Change to use `rust-analyzer proc-macro` for running proc-macro standalone process. Co-authored-by: Edwin Cheng <[email protected]>
| * | | | | Remove ci changesEdwin Cheng2020-04-161-4/+0
| | | | | |
| * | | | | Fix extern_process argsEdwin Cheng2020-04-162-8/+22
| | | | | |