aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix clippy::redundant_cloneShotaro Yamada2019-07-054-6/+5
|/
* Formatting againJeremy Kolb2019-07-051-5/+5
|
* Symplify by using into()Jeremy Kolb2019-07-051-3/+3
|
* FormattingJeremy Kolb2019-07-041-1/+3
|
* Some clippy fixes for 1.36Jeremy Kolb2019-07-0431-70/+62
|
* Fix formattingJeremy Kolb2019-07-041-5/+5
|
* Change default()Jeremy Kolb2019-07-041-1/+1
|
* Update to lsp-types 0.58.0Jeremy Kolb2019-07-043-7/+7
|
* Merge #1485bors[bot]2019-07-041-1/+1
|\ | | | | | | | | | | | | | | 1485: rand 0.7.0 r=matklad a=kjeremy Co-authored-by: Jeremy Kolb <[email protected]>
| * rand 0.7.0Jeremy Kolb2019-07-041-1/+1
| |
* | Merge #1486bors[bot]2019-07-04165-787/+772
|\ \ | |/ |/| | | | | | | | | | | 1486: allow rustfmt to reorder imports r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * allow rustfmt to reorder importsAleksey Kladov2019-07-04165-787/+772
| | | | | | | | | | | | This wasn't a right decision in the first place, the feature flag was broken in the last rustfmt release, and syntax highlighting of imports is more important anyway
* | Merge #1478bors[bot]2019-07-032-2/+39
|\ \ | |/ |/| | | | | | | | | | | 1478: [WIP] Added resolve submodules with raw name r=matklad a=andreevlex #1211 Co-authored-by: Alexander Andreev <[email protected]>
| * Fixed request changesAlexander Andreev2019-07-032-6/+5
| |
| * Move resolve raw name in name.rsAlexander Andreev2019-07-033-11/+40
| | | | | | | | Added test for check module resolution with raw name
| * Added resolve submodules with raw nameAlexander Andreev2019-07-031-0/+9
| | | | | | | | #1211
* | extend add_impl_members to constants and typesEkaterina Babshukova2019-07-032-50/+87
|/
* Add completion for type aliasesShotaro Yamada2019-07-022-1/+45
|
* remove snapshot filesfunkill22019-07-0113-273/+0
|
* inline snapshotsfunkill22019-07-011-157/+366
|
* put source maps first for better statsAleksey Kladov2019-06-302-8/+8
|
* collect more macros, they are heavyAleksey Kladov2019-06-301-0/+1
|
* print memory usage for queriesAleksey Kladov2019-06-307-13/+101
|
* Move memory usage statistics to ra_profAleksey Kladov2019-06-308-66/+76
|
* Remove parse error on array initializer attributesRyan Cumming2019-06-303-76/+0
| | | | | This is actually allowed by the `rustc` parser but most attributes will fail later due to attributes on expressions being experimental.
* Support attributes on array membersRyan Cumming2019-06-307-0/+205
| | | | | | | | | | | | Array members are allow to have attributes such as `#[cfg]`. This is a bit tricky as we don't know if the first expression is an initializer or a member until we encounter a `;`. This reuses a trick from `stmt` where we remember if we saw an attribute and then raise an error if the first expression ends up being an initializer. This isn't perfect as the error isn't correctly located on the attribute or initializer; it ends up immediately after the `;`.
* Merge #1456bors[bot]2019-06-291-1/+31
|\ | | | | | | | | | | | | | | 1456: Deduplicate method candidates r=matklad a=flodiebold With trait method completion + autoderef, we were getting a lot of duplicates, which was really annoying... Co-authored-by: Florian Diebold <[email protected]>
| * Deduplicate method candidatesFlorian Diebold2019-06-291-1/+31
| |
* | Complete associated methods on enums (and unions) as wellFlorian Diebold2019-06-294-6/+91
|/
* show macros in file structureEkaterina Babshukova2019-06-282-5/+25
|
* Merge #1440bors[bot]2019-06-284-7/+90
|\ | | | | | | | | | | | | | | 1440: fixed #1384 r=matklad a=zbelial This PR fixed #1384 . Co-authored-by: zjy <[email protected]>
| * fixed #1384zjy2019-06-284-7/+90
| |
* | Swallow expected `rustfmt` errorsRyan Cumming2019-06-261-10/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | My workflow in Visual Studio Code + Rust Analyzer has become: 1. Make a change to Rust source code using all the analysis magic 2. Save the file to trigger `cargo watch`. I have format on save enabled for all file types so this also runs `rustfmt` 3. Fix any diagnostics that `cargo watch` finds Unfortunately if the Rust source has any syntax errors the act of saving will pop up a scary "command has failed" message and will switch to the "Output" tab to show the `rustfmt` error and exit code. I did a quick survey of what other Language Servers do in this case. Both the JSON and TypeScript servers will swallow the error and return success. This is consistent with how I remember my workflow in those languages. The syntax error will show up as a diagnostic so it should be clear why the file isn't formatting. I checked the `rustfmt` source code and while it does distinguish "parse errors" from "operational errors" internally they both result in exit status of 1. However, more catastrophic errors (missing `rustfmt`, SIGSEGV, etc) will return 127+ error codes which we can distinguish from a normal failure. This changes our handler to log an info message and feign success if `rustfmt` exits with status 1. Another option I considered was only swallowing the error if the formatting request came from format-on-save. However, the Language Server Protocol doesn't seem to distinguish those cases.
* | make sure that CrateDefMap is independent from syntaxAleksey Kladov2019-06-267-48/+55
| |
* | Merge #1443bors[bot]2019-06-263-194/+240
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1443: cache chalk queries r=flodiebold a=matklad This gives a significant speedup, because chalk will call these functions several times even withing a single revision. The only significant one here is `impl_data`, but I figured it might be good to cache others just for consistency. The results I get are: Before: from scratch: 16.081457952s no change: 15.846493ms trivial change: 352.95592ms comment change: 361.998408ms const change: 457.629212ms After: from scratch: 14.910610278s no change: 14.934647ms trivial change: 85.633023ms comment change: 96.433023ms const change: 171.543296ms Seems like a nice win! Co-authored-by: Aleksey Kladov <[email protected]>
| * | cache chalk queriesAleksey Kladov2019-06-263-194/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gives a significant speedup, because chalk will call these functions several times even withing a single revision. The only significant one here is `impl_data`, but I figured it might be good to cache others just for consistency. The results I get are: Before: from scratch: 16.081457952s no change: 15.846493ms trivial change: 352.95592ms comment change: 361.998408ms const change: 457.629212ms After: from scratch: 14.910610278s no change: 14.934647ms trivial change: 85.633023ms comment change: 96.433023ms const change: 171.543296ms Seems like a nice win!
* | | move ra_prof dep where it belongsAleksey Kladov2019-06-262-5/+4
|/ /
* / add cpuprofile to ra_profAleksey Kladov2019-06-263-0/+38
|/ | | | | | | | | Now, one can use `let _p = ra_prof::cpu_profiler()` to capture profile of a block of code. This is not an out of the box experience, as that relies on gperfools See the docs on https://github.com/AtheMathmo/cpuprofiler for more!
* Merge #1432bors[bot]2019-06-251-2/+57
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1432: Make fill_match_arm work with trivial arm r=matklad a=ironyman Addresses this issue https://github.com/rust-analyzer/rust-analyzer/issues/1399 One minor issue I noticed is that complete_postfix creates an arm like this ``` match E::X { <|>_ => {}, } ``` but fill_match_arms creates arms like this ``` E::X => (), ``` Co-authored-by: ironyman <[email protected]> Co-authored-by: Changyu Li <[email protected]>
| * Review 1Changyu Li2019-06-251-16/+19
| |
| * fill_match_arm works with trivial armironyman2019-06-241-2/+54
| |
* | Add commentShotaro Yamada2019-06-251-6/+8
| |
* | Method resolution for slicesShotaro Yamada2019-06-241-25/+36
| |
* | Merge #1429bors[bot]2019-06-242-1/+10
|\ \ | | | | | | | | | | | | | | | | | | | | | 1429: Add box postfix completion r=matklad a=kanru Co-authored-by: Kan-Ru Chen <[email protected]>
| * | Add box postfix completionKan-Ru Chen2019-06-232-1/+10
| |/
* | Merge #1415bors[bot]2019-06-245-1/+149
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 1415: fix: specialization r=matklad a=csmoe Closes #1402 r? @matklad Co-authored-by: csmoe <[email protected]>
| * | fix: specialization(with blindly parsing)csmoe2019-06-195-1/+149
| | | | | | | | | | | | Change-Id: Ic5d2767e8781568d76d4d0013cd6081e95ae8a95
* | | Add SourceRoot::is_library, in preparation for salsa's durabilityAleksey Kladov2019-06-242-1/+16
| |/ |/|
* | Bump cargo_metadata, ena, flexi_loggerkjeremy2019-06-205-6/+6
| |
* | don' collect macrosAleksey Kladov2019-06-201-3/+6
| |