aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | 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
| | | | | |
| * | | | | Add proc-macro cli command for rust-analyzerEdwin Cheng2020-04-1614-26/+47
| | | | | |
| * | | | | Add tests for proc_macroEdwin Cheng2020-04-162-1/+92
| | | | | |
| * | | | | Add config for proc_macroEdwin Cheng2020-04-165-1/+22
| | | | | |
| * | | | | Add with-proc-macro in bench ,stats and diagnositcsEdwin Cheng2020-04-166-13/+49
| | | | | |
* | | | | | Merge #3994bors[bot]2020-04-164-9/+7
|\ \ \ \ \ \ | | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3994: Don't expose SyntaxNodePtr impl details r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | Don't expose SyntaxNodePtr impl detailsAleksey Kladov2020-04-164-9/+7
|/ / / / /
* | | | | Merge #3992bors[bot]2020-04-161-10/+10
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3992: cargo update r=kjeremy a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * | | | | cargo updatekjeremy2020-04-161-10/+10
|/ / / / /
* | | | | Merge #3979bors[bot]2020-04-163-3/+51
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3979: fix missing match arm false positive for enum with no variants r=flodiebold a=JoshMcguigan fixes #3974 Co-authored-by: Josh Mcguigan <[email protected]>
| * | | | | fix false positive for enum with no variantsJosh Mcguigan2020-04-163-3/+51
| | |_|_|/ | |/| | |
* | | | | Merge #3990bors[bot]2020-04-165-40/+121
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3990: Switch to Chalk recursive solver r=matklad a=flodiebold Before: ``` Expressions of unknown type: 5526 (3%) Expressions of partially unknown type: 5415 (3%) ``` After: ``` Expressions of unknown type: 4600 (2%) Expressions of partially unknown type: 4645 (2%) ``` On the other hand, ``` './target/release/rust-analyzer analysis-stats -q . # old solver' ran 1.24 ± 0.04 times faster than 'rust-analyzer analysis-stats -q . # new solver' ``` I think part of this just comes from the fact that we're inferring more types now; but apart from that, it should be possible to improve the performance a bunch, and I'll make looking into that a priority. Co-authored-by: Florian Diebold <[email protected]>
| * | | | | Test for non-working proc macro server assoc typesFlorian Diebold2020-04-161-0/+68
| | | | | |
| * | | | | Switch Chalk to recursive solverFlorian Diebold2020-04-165-40/+53
|/ / / / / | | | | | | | | | | | | | | | + various fixes related to that.
* | | | | Merge #3989bors[bot]2020-04-163-11/+12
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3989: Update Chalk r=flodiebold a=flodiebold Co-authored-by: Florian Diebold <[email protected]>
| * | | | Update ChalkFlorian Diebold2020-04-163-11/+12
|/ / / /
* | | | Merge #3948bors[bot]2020-04-161-2/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3948: fix: inlay hints config desyncronization between the frontend and the backend r=matklad a=Veetaha See the explanation in the issue comment: https://github.com/rust-analyzer/rust-analyzer/issues/3924#issuecomment-612444566 Workaround-ly fixes: #3924 Co-authored-by: veetaha <[email protected]>
| * | | | fix: inlay hints config desyncronization between the frontend and the backendveetaha2020-04-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | See the explanation in the issue comment: https://github.com/rust-analyzer/rust-analyzer/issues/3924#issuecomment-612444566
* | | | | Merge #3962bors[bot]2020-04-151-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3962: Fix parentModule shortcut conflict r=matklad a=CodeSandwich The default parentModule shortcut conflicts with VSCode's built-in undo selection Co-authored-by: Igor Ĺ»uk <[email protected]>
| * | | | | Fix parentModule shortcut conflictIgor Żuk2020-04-131-1/+1
| | | | | | | | | | | | | | | | | | The default parentModule shortcut conflicts with VSCode's built-in undo selection
| | | | | |
| \ \ \ \ \
*-. \ \ \ \ \ Merge #3966 #3968bors[bot]2020-04-155-16/+119
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3966: Add support for bounds on associated types in trait definitions r=matklad a=flodiebold E.g. ```rust trait Trait { type Item: SomeOtherTrait; } ``` Note that these don't simply desugar to where clauses; as I understand it, where clauses have to be proved by the *user* of the trait, but these bounds are proved by the *implementor*. (Also, where clauses on associated types are unstable.) (Another one from my recursive solver branch...) 3968: Remove format from syntax_bridge hot path r=matklad a=edwin0cheng Although only around 1% speed up by running: ``` Measure-Command {start-process .\target\release\rust-analyzer "analysis-stats -q ." -NoNewWindow -wait} ``` Co-authored-by: Florian Diebold <[email protected]> Co-authored-by: Edwin Cheng <[email protected]>
| | * | | | | | Remove format from syntax_bridge hot pathEdwin Cheng2020-04-131-5/+6
| | | | | | | |
| * | | | | | | Add support for bounds on associated types in trait definitionsFlorian Diebold2020-04-134-11/+113
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | E.g. ``` trait Trait { type Item: SomeOtherTrait; } ``` Note that these don't simply desugar to where clauses; as I understand it, where clauses have to be proved by the *user* of the trait, but these bounds are proved by the *implementor*. (Also, where clauses on associated types are unstable.)
| | | | | | |
| \ \ \ \ \ \
| \ \ \ \ \ \
| \ \ \ \ \ \
*---. \ \ \ \ \ \ Merge #3964 #3965 #3967bors[bot]2020-04-1510-32/+192
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3964: Nicer Chalk debug logs r=matklad a=flodiebold I'm looking at a lot of Chalk debug logs at the moment, so here's a few changes to make them slightly nicer... 3965: Implement inline associated type bounds r=matklad a=flodiebold Like `Iterator<Item: SomeTrait>`. This is an unstable feature, but it's used in the standard library e.g. in the definition of Flatten, so we can't get away with not implementing it :) (This is cherry-picked from my recursive solver branch, where it works better, but I did manage to write a test that works with the current Chalk solver as well...) 3967: Handle `Self::Type` in trait definitions when referring to own associated type r=matklad a=flodiebold It was implemented for other generic parameters for the trait, but not for `Self`. (Last one off my recursive solver branch :smile: ) Co-authored-by: Florian Diebold <[email protected]>
| | | * | | | | | | Handle `Self::Type` in trait definitions when referring to own associated typeFlorian Diebold2020-04-133-5/+38
| | | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | It was implemented for other generic parameters for the trait, but not for `Self`.
| | * / / / / / / Implement inline associated type boundsFlorian Diebold2020-04-136-17/+120
| | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like `Iterator<Item: SomeTrait>`. This is an unstable feature, but it's used in the standard library e.g. in the definition of Flatten, so we can't get away with not implementing it :)
| * | | | | | | Nicer display of projections in Chalk logsFlorian Diebold2020-04-133-8/+12
| | | | | | | |
| * | | | | | | Nicer display of closures in Chalk logsFlorian Diebold2020-04-131-2/+22
| |/ / / / / /
* | | | | | | Merge #3963bors[bot]2020-04-153-22/+88
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3963: Upgrade Chalk r=matklad a=flodiebold Co-authored-by: Florian Diebold <[email protected]>
| * | | | | | | Upgrade ChalkFlorian Diebold2020-04-133-22/+88
| |/ / / / / /
* | | | | | | Merge #3969bors[bot]2020-04-154-29/+30
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3969: Change add_function assist to use todo!() instead of unimplemented!() r=matklad a=TimoFreiberg In the spirit of #3935 Co-authored-by: Timo Freiberg <[email protected]>