aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
* 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-172-2/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | 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-172-2/+6
| |/
* | 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
| |
* | 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-1614-29/+201
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]>
| * Fix extern_process argsEdwin Cheng2020-04-162-8/+22
| |
| * Add proc-macro cli command for rust-analyzerEdwin Cheng2020-04-1611-18/+43
| |
| * Add tests for proc_macroEdwin Cheng2020-04-161-1/+88
| |
| * Add config for proc_macroEdwin Cheng2020-04-163-1/+11
| |
| * Add with-proc-macro in bench ,stats and diagnositcsEdwin Cheng2020-04-166-13/+49
| |
* | Don't expose SyntaxNodePtr impl detailsAleksey Kladov2020-04-164-9/+7
| |
* | 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
| | |
* | | 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.
* | | Update ChalkFlorian Diebold2020-04-162-5/+6
| |/ |/|
| |
| \
*-. \ 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-159-32/+191
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-132-8/+11
| | | | |
| * | | | Nicer display of closures in Chalk logsFlorian Diebold2020-04-131-2/+22
| |/ / /
* | | | Merge #3963bors[bot]2020-04-152-16/+69
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3963: Upgrade Chalk r=matklad a=flodiebold Co-authored-by: Florian Diebold <[email protected]>
| * | | | Upgrade ChalkFlorian Diebold2020-04-132-16/+69
| |/ / /
* | | | Merge #3969bors[bot]2020-04-152-28/+28
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]>
| * | | | Change add_function assist to use todo!()Timo Freiberg2020-04-132-28/+28
| | |_|/ | |/| |
* | | | Merge #3978bors[bot]2020-04-154-4/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3978: insta 0.16 r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * | | | insta 0.16kjeremy2020-04-144-4/+4
| |/ / /
* | | | Merge #3971bors[bot]2020-04-155-4/+127
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3971: add diagnostics subcommand to rust-analyzer CLI r=JoshMcguigan a=JoshMcguigan This PR adds a `diagnostics` subcommand to the rust-analyzer CLI. The intent is to detect all diagnostics on a workspace. It returns a non-zero status code if any error diagnostics are detected. Ideally I'd like to run this in CI against the rust analyzer project as a guard against false positives. ``` $ cargo run --release --bin rust-analyzer -- diagnostics . ``` Questions for reviewers: 1. Is this the proper way to get all diagnostics for a workspace? It seems there are at least a few ways this can be done, and I'm not sure if this is the most appropriate mechanism to do this. 2. It currently prints out the relative file path as it is collecting diagnostics, but it doesn't print the crate name. Since the file name is relative to the crate there can be repeated names, so it would be nice to print some identifier for the crate as well, but it wasn't clear to me how best to accomplish this. Co-authored-by: Josh Mcguigan <[email protected]>
| * | | diagnostics cli, iterate over membersJosh Mcguigan2020-04-152-19/+27
| | | |
| * | | cli diagnostics walk filesJosh Mcguigan2020-04-143-50/+51
| | | |
| * | | add diagnostics subcommand to rust-analyzer CLIJosh Mcguigan2020-04-144-3/+117
| |/ /
* | | Merge #3961bors[bot]2020-04-131-3/+30
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3961: Fix double comma when merge imports on second line r=edwin0cheng a=IceSentry This fixes the bug when merging imports from the second line when it already has a comma it would previously insert a comma. There's probably a better way to check for a COMMA. This also ends up with a weird indentation, but rust-fmt can easily deal with it so I'm not sure how to resolve that. Closes #3832 Co-authored-by: IceSentry <[email protected]>
| * | | Fix PRIceSentry2020-04-131-14/+8
| | | |
| * | | Generalize test and clean up importsIceSentry2020-04-131-8/+7
| | | |
| * | | Fix double comma when merge imports on second lineIceSentry2020-04-131-3/+37
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the a bug when merging imports from the second line when it already has a comma it would previously insert a comma. There's probably a better way to check for a COMMA. This also ends up with a weird indentation, but rust-fmt can easily deal with it so I'm not sure how to resolve that. Closes #3832
* | | Merge #3960bors[bot]2020-04-134-58/+141
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3960: ellipsis in tuple patterns r=JoshMcguigan a=JoshMcguigan This PR lowers ellipsis in tuple patterns. It fixes a bug in the way ellipsis were previously lowered (by replacing the ellipsis with a single `Pat::Wild` no matter how many items the `..` was taking the place of). It also uses this new information to properly handle `..` in tuple struct patterns when perform match statement exhaustiveness checks. While this PR provides the building blocks for match statement exhaustiveness checks for tuples, there are some additional challenges there, so that is still unimplemented (unlike tuple structs). Co-authored-by: Josh Mcguigan <[email protected]>
| * | handle tuple patterns with ellipsisJosh Mcguigan2020-04-134-58/+141
| | |
* | | Remove more unnecessary bracesLaurențiu Nicola2020-04-121-2/+2
|/ /
* | Merge #3938bors[bot]2020-04-122-12/+253
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 3938: fix missing match arm false positive r=flodiebold a=JoshMcguigan This fixes #3932 by skipping the missing match arm diagnostic in the case any of the match arms don't type check properly against the match expression. I think this is the appropriate behavior for this diagnostic, since `is_useful` relies on all match arms being well formed, and the case of a malformed match arm should probably be handled by a different diagnostic. Co-authored-by: Josh Mcguigan <[email protected]>
| * | missing match arm add test cases to demonstrate enum tuple struct with ↵Josh Mcguigan2020-04-121-0/+64
| | | | | | | | | | | | ellipsis behavior
| * | missing match arms add test cases to demonstrate behavior of tuple with patternJosh Mcguigan2020-04-121-0/+75
| | |