aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Some clippy fixes for 1.36Jeremy Kolb2019-07-0431-70/+62
|
* Merge #1484bors[bot]2019-07-044-15/+15
|\ | | | | | | | | | | | | | | 1484: Update to lsp-types 0.58.0 r=matklad a=kjeremy Fixes CodeActionResponse Co-authored-by: Jeremy Kolb <[email protected]>
| * Fix formattingJeremy Kolb2019-07-041-5/+5
| |
| * Change default()Jeremy Kolb2019-07-041-1/+1
| |
| * Update to lsp-types 0.58.0Jeremy Kolb2019-07-044-11/+11
|/
* Merge #1485bors[bot]2019-07-042-2/+90
|\ | | | | | | | | | | | | | | 1485: rand 0.7.0 r=matklad a=kjeremy Co-authored-by: Jeremy Kolb <[email protected]>
| * rand 0.7.0Jeremy Kolb2019-07-042-2/+90
| |
* | Merge #1486bors[bot]2019-07-04166-788/+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-04166-788/+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
* | Merge #1476bors[bot]2019-07-032-50/+87
|\ \ | | | | | | | | | | | | | | | | | | | | | 1476: Extend add_impl_members to constants and types r=matklad a=viorina Co-authored-by: Ekaterina Babshukova <[email protected]>
| * | extend add_impl_members to constants and typesEkaterina Babshukova2019-07-032-50/+87
| |/
* | Merge #1477bors[bot]2019-07-032-41/+42
|\ \ | |/ |/| | | | | | | | | | | 1477: Update vsce to 1.64.0 r=matklad a=kjeremy Gets rid of the annoying warning asking you to run `npm install -g vsce` on `cargo install`. Co-authored-by: kjeremy <[email protected]>
| * Update vsce to latestkjeremy2019-07-032-41/+42
|/
* Merge #1472bors[bot]2019-07-022-1/+45
|\ | | | | | | | | | | | | | | 1472: Add completion for type aliases r=matklad a=sinkuu Co-authored-by: Shotaro Yamada <[email protected]>
| * Add completion for type aliasesShotaro Yamada2019-07-022-1/+45
|/
* Merge #1468bors[bot]2019-07-0214-430/+366
|\ | | | | | | | | | | | | | | 1468: Use inline snapshots in complete_path r=matklad a=funkill Relates to #1127 Co-authored-by: funkill2 <[email protected]>
| * remove snapshot filesfunkill22019-07-0113-273/+0
| |
| * inline snapshotsfunkill22019-07-011-157/+366
|/
* Merge #1465bors[bot]2019-06-302-8/+8
|\ | | | | | | | | | | | | | | 1465: put source maps first for better stats r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * put source maps first for better statsAleksey Kladov2019-06-302-8/+8
|/
* Merge #1464bors[bot]2019-06-301-0/+1
|\ | | | | | | | | | | | | | | 1464: collect more macros, they are heavy r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * collect more macros, they are heavyAleksey Kladov2019-06-301-0/+1
|/
* Merge #1463bors[bot]2019-06-307-13/+101
|\ | | | | | | | | | | | | | | 1463: print memory usage for queries r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * print memory usage for queriesAleksey Kladov2019-06-307-13/+101
|/
* Merge #1462bors[bot]2019-06-309-68/+78
|\ | | | | | | | | | | | | | | 1462: Move memory usage statistics to ra_prof r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Move memory usage statistics to ra_profAleksey Kladov2019-06-309-68/+78
| |
* | Merge #1458bors[bot]2019-06-303-6/+21
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | 1458: Run VS Code tests on CI r=matklad a=etaoins This is actually much faster than I expected; it takes about 13 seconds to download VS Code and run the unit tests. This means the VS Code tests are still significantly faster than the Rust ones. If this ends up being unreliable we can always remove it later or move it to a separate optional job. We also need to ignore the `.vscode-test` directory when running `prettier` or it will get upset about some temporary JSON files VS Code creates. cc @killercup Co-authored-by: Ryan Cumming <[email protected]>
| * Run VS Code tests on CIRyan Cumming2019-06-293-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | This is actually much faster than I expected; it takes about 13 seconds to download VS Code and run the unit tests. This means the VS Code tests are still significantly faster than the Rust ones. If this ends up being unreliable we can always remove it later or move it to a separate optional job. We also need to ignore the `.vscode-test` directory when running `prettier` or it will get upset about some temporary JSON files VS Code creates.
* | Merge #1461bors[bot]2019-06-305-0/+129
|\ \ | | | | | | | | | | | | | | | | | | | | | 1461: Support attributes on array members r=matklad a=etaoins Array members are allowed to have attributes such as `#[cfg]`. Co-authored-by: Ryan Cumming <[email protected]>
| * | 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 #1459bors[bot]2019-06-303-1/+70
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1459: Include primary span label in VS Code diagnostics r=matklad a=etaoins In most cases the primary label span repeats information found elsewhere in the diagnostic. For example, with E0061: ```json { "message": "this function takes 2 parameters but 3 parameters were supplied", "spans": [{"label": "expected 2 parameters"}] } ``` However, with some mismatched type errors (E0308) the expected type only appears in the primary span's label, e.g.: ```json { "message": "mismatched types", "spans": [{"label": "expected usize, found u32"}] } ``` I initially added the primary span label to the message unconditionally. However, for most error types the child diagnostics repeat the primary span label with more detail. `rustc` also renders the duplicate text but because the span label and child diagnostics appear in visually distinct places it's not as confusing. This takes a heuristic approach where it will only add the primary span label if there are no child message lines. For most error types the child messages repeat the primary span label with more detail. Co-authored-by: Ryan Cumming <[email protected]>
| * | Include primary span label in VS Code diagnosticsRyan Cumming2019-06-303-1/+70
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In most cases the primary label span repeats information found elsewhere in the diagnostic. For example, with E0061: ``` { "message": "this function takes 2 parameters but 3 parameters were supplied", "spans": [{"label": "expected 2 parameters"}] } ``` However, with some mismatched type errors (E0308) the expected type only appears in the primary span's label, e.g.: ``` { "message": "mismatched types", "spans": [{"label": "expected usize, found u32"}] } ``` I initially added the primary span label to the message unconditionally. However, for most error types the child diagnostics repeat the primary span label with more detail. `rustc` also renders the duplicate text but because the span label and child diagnostics appear in visually distinct places it's not as confusing. This takes a heuristic approach where it will only add the primary span label if there are no child message lines.
* | Merge #1460bors[bot]2019-06-301-0/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | 1460: Consider unreachable code to be unnecessary in VSC r=matklad a=etaoins This adds `unreachable_code` to the list of diagnostic codes we map to `Unnecessary` in Visual Studio Code. This is consistent with what the TypeScript language server does. Before: <img width="308" alt="Screen Shot 2019-06-30 at 12 08 56" src="https://user-images.githubusercontent.com/687534/60391416-133d5480-9b31-11e9-86fb-e252739ab3a8.png"> After: <img width="303" alt="Screen Shot 2019-06-30 at 12 16 49" src="https://user-images.githubusercontent.com/687534/60391418-19333580-9b31-11e9-9eea-850c62eb9a07.png"> Co-authored-by: Ryan Cumming <[email protected]>
| * Consider unreachable code to be unnecessary in VSCRyan Cumming2019-06-301-0/+1
|/ | | | | | This adds `unreachable_code` to the list of diagnostic codes we map to `Unnecessary` in Visual Studio Code. This is consistent with what the TypeScript language server does.
* 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
| |
* | Merge #1457bors[bot]2019-06-294-6/+91
|\ \ | | | | | | | | | | | | | | | | | | | | | 1457: Complete associated methods on enums (and unions) as well r=matklad a=flodiebold This has been seriously annoying me for a while ;) Co-authored-by: Florian Diebold <[email protected]>
| * | Complete associated methods on enums (and unions) as wellFlorian Diebold2019-06-294-6/+91
| |/
* | Merge #1454bors[bot]2019-06-2910-254/+498
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | 1454: Fix `cargo watch` code action filtering r=etaoins a=etaoins There are two issues with the implementation of `provideCodeActions` introduced in #1439: 1. We're returning the code action based on the file its diagnostic is in; not the file the suggested fix is in. I'm not sure how often fixes are suggested cross-file but it's something we should handle. 2. We're not filtering code actions based on the passed range. The means if there is any suggestion in a file we'll show an action for every line of the file. I naively thought that VS Code would filter for us but that was wrong. Unfortunately the VS Code `CodeAction` object is very complex - it can handle edits across multiple files, run commands, etc. This makes it complex to check them for equality or see if any of their edits intersects with a specified range. To make it easier to work with suggestions this introduces a `SuggestedFix` model object and a `SuggestFixCollection` code action provider. This is a layer between the raw Rust JSON and VS Code's `CodeAction`s. I was reluctant to introduce another layer of abstraction here but my attempt to work directly with VS Code's model objects was worse. Co-authored-by: Ryan Cumming <[email protected]>
| * Comment on the key of `suggestedFixes`Ryan Cumming2019-06-291-0/+3
| | | | | | | | This isn't immediately obvious without looking at the users of the map
| * Fix `cargo watch` code action filteringRyan Cumming2019-06-2910-254/+495
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two issues with the implementation of `provideCodeActions` introduced in #1439: 1. We're returning the code action based on the file its diagnostic is in; not the file the suggested fix is in. I'm not sure how often fixes are suggested cross-file but it's something we should handle. 2. We're not filtering code actions based on the passed range. The means if there is any suggestion in a file we'll show an action for every line of the file. I naively thought that VS Code would filter for us but that was wrong. Unfortunately the VS Code `CodeAction` object is very complex - it can handle edits across multiple files, run commands, etc. This makes it complex to check them for equality or see if any of their edits intersects with a specified range. To make it easier to work with suggestions this introduces a `SuggestedFix` model object and a `SuggestFixCollection` code action provider. This is a layer between the raw Rust JSON and VS Code's `CodeAction`s. I was reluctant to introduce another layer of abstraction here but my attempt to work directly with VS Code's model objects was worse.
* | Merge #1455bors[bot]2019-06-292-2/+2
|\ \ | |/ |/| | | | | | | | | | | 1455: Add noUnusedLocals to VsCode tsconfig r=matklad a=etaoins `tslint` doesn't catch this because TypeScript has had this check builtin since 2.9. However, it's disabled by default so right now nothing is checking for unused variables. Co-authored-by: Ryan Cumming <[email protected]>
| * Add noUnusedLocals to VsCode tsconfigRyan Cumming2019-06-292-2/+2
|/ | | | | | `tslint` doesn't catch this because TypeScript has had this check builtin since 2.9. However, it's disabled by default so right now nothing is checking for unused variables.
* Merge #1453bors[bot]2019-06-291-0/+26
|\ | | | | | | | | | | | | | | 1453: Add show syntax tree function to emacs r=matklad a=zbelial This PR adds preliminary support for showing syntax tree. Co-authored-by: zbelial <[email protected]>
| * Add show syntax tree function to emacszbelial2019-06-291-0/+26
|/