aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |
* | Merge #1439bors[bot]2019-06-252-54/+358
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1439: Rich mapping of cargo watch output r=matklad a=etaoins Currently we depend on the ASCII rendering string that `rustc` provides to populate Visual Studio Code's diagnostic. This has a number of shortcomings: 1. It's not a very good use of space in the error list 2. We can't jump to secondary spans (e.g. where a called function is defined) 3. We can't use Code Actions aka Quick Fix This moves all of the low-level parsing and mapping to a `rust_diagnostics.ts`. This uses some heuristics to map Rust diagnostics to VsCode: 1. As before, the Rust diagnostic message and primary span is used for the root diagnostic. However, we now just use the message instead of the rendered version. 2. Every secondary span is converted to "related information". This shows as child in the error list and can be jumped to. 3. Every child diagnostic is categorised in to three buckets: 1. If they have no span they're treated as another line of the root messages 2. If they have replacement text they're treated as a Code Action 3. If they have a span but no replacement text they're treated as related information (same as secondary spans). Co-authored-by: Ryan Cumming <[email protected]>
| * | Tweak isUnusedOrUnnecessaryRyan Cumming2019-06-251-2/+8
| | | | | | | | | | | | | | | | | | | | | The first cut was a bit rough with the blanket `unused_*` rule. This trigger for things like `unused_mut` where the code is used but it's suboptimal. It's misleading to grey out the code in those cases. Instead, use an explicit list of things known to be dead code.
| * | Fix comparison of Code Action edit lengthsRyan Cumming2019-06-251-1/+1
| | | | | | | | | | | | | | | This happened to work because we always produce a single edit but this is obviously dubious.
| * | Rich mapping of cargo watch outputRyan Cumming2019-06-252-54/+352
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we depend on the ASCII rendering string that `rustc` provides to populate Visual Studio Code's diagnostic. This has a number of shortcomings: 1. It's not a very good use of space in the error list 2. We can't jump to secondary spans (e.g. where a called function is defined) 3. We can't use Code Actions aka Quick Fix This moves all of the low-level parsing and mapping to a `rust_diagnostics.ts`. This uses some heuristics to map Rust diagnostics to VsCode: 1. As before, the Rust diagnostic message and primary span is used for the root diagnostic. However, we now just use the message instead of the rendered version. 2. Every secondary span is converted to "related information". This shows as child in the error list and can be jumped to. 3. Every child diagnostic is categorised in to three buckets: 1. If they have no span they're treated as another line of the root messages 2. If they have replacement text they're treated as a Code Action 3. If they have a span but no replacement text they're treated as related information (same as secondary spans).
* | | Merge #1436bors[bot]2019-06-251-25/+38
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | 1436: Method resolution for slices r=sinkuu a=sinkuu `impl<T> [T]` is separately defined in `core` and `alloc`, so I changed `def_crate` function in `method_resolution.rs` to return multiple crates. Co-authored-by: Shotaro Yamada <[email protected]>
| * | Add commentShotaro Yamada2019-06-251-6/+8
| | |
| * | Method resolution for slicesShotaro Yamada2019-06-241-25/+36
|/ /
* | Merge #1434bors[bot]2019-06-244-14/+38
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 1434: Introduce cargo-watch.check-command option for Code extension r=matklad a=alekseysidorov By this option you can replace `check` command in `cargo watch` by the something else like `clippy`. Co-authored-by: Aleksei Sidorov <[email protected]> Co-authored-by: Aleksey Sidorov <[email protected]>
| * | Fix code after "apply suggestions"Aleksei Sidorov2019-06-244-15/+21
| | |
| * | Apply suggestions from code reviewAleksey Sidorov2019-06-242-4/+4
| | | | | | | | | Co-Authored-By: Aleksey Kladov <[email protected]>
| * | Fix tslintsAleksei Sidorov2019-06-242-5/+3
| | |
| * | Introduce cargo-watch.check-commandAleksei Sidorov2019-06-244-7/+27
| |/
* | 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
* | | Merge #1433bors[bot]2019-06-242-1/+16
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | 1433: Add SourceRoot::is_library, in preparation for salsa's durability r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | Add SourceRoot::is_library, in preparation for salsa's durabilityAleksey Kladov2019-06-242-1/+16
|/ /
* | Merge #1421bors[bot]2019-06-206-23/+30
|\ \ | | | | | | | | | | | | | | | | | | | | | 1421: Bump cargo_metadata, ena, flexi_logger r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * | Bump cargo_metadata, ena, flexi_loggerkjeremy2019-06-206-23/+30
|/ /
* | Merge #1420bors[bot]2019-06-201-3/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | 1420: don' collect macros r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | don' collect macrosAleksey Kladov2019-06-201-3/+6
|/ /
* | Merge #1419bors[bot]2019-06-193-17/+38
|\ \ | | | | | | | | | | | | | | | | | | | | | 1419: Add firewall query to lang items r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | Add firewall query to lang itemsAleksey Kladov2019-06-193-17/+38
| | | | | | | | | | | | | | | With an intermediate query, changing one module won't cause reparsing of all modules
* | | Merge #1414bors[bot]2019-06-198-6/+97
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | 1414: fix: box_syntax/pattern r=matklad a=csmoe Closes #1412 r? @matklad Co-authored-by: csmoe <[email protected]>
| * | fix: box_patterncsmoe2019-06-199-11/+94
| | | | | | | | | | | | Change-Id: I45a856d74fb616d3bce33050f9e69d327186bd59
| * | fix: box_syntax(#1412)csmoe2019-06-182-0/+8
| | | | | | | | | | | | Change-Id: I6e20e0163fa545de37226c1561b3b7103615626c
* | | Merge #1418bors[bot]2019-06-1910-70/+66
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1418: rename XSignature -> XData r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | rename XSignature -> XDataAleksey Kladov2019-06-1810-70/+66
| |/ /
* | | Merge #1417bors[bot]2019-06-191-89/+89
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | 1417: :arrow_up: ra_vfs r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | :arrow_up: ra_vfsAleksey Kladov2019-06-191-89/+89
|/ /
* | Merge #1413bors[bot]2019-06-181-0/+21
|\ \ | |/ |/| | | | | | | | | | | 1413: More details on how to set up coc r=matklad a=mark-i-m I spent ~1 hour trying to figure this out. It's all pretty simple stuff, but very annoying... Co-authored-by: Who? Me?! <[email protected]>
| * More details on how to set up cocWho? Me?!2019-06-181-0/+21
|/
* Merge #1409bors[bot]2019-06-165-24/+19
|\ | | | | | | | | | | | | | | | | | | | | | | 1409: The Fall down of failures r=matklad a=mominul :grin: Replaced all the uses of `failure` crate with `std::error::Error`. Closes #1400 Depends on rust-analyzer/teraron#1 Co-authored-by: Muhammad Mominul Huque <[email protected]>
| * Update teraron versionMuhammad Mominul Huque2019-06-162-5/+5
| |
| * Fall down of failuresMuhammad Mominul Huque2019-06-155-24/+19
| |
* | Merge #1411bors[bot]2019-06-169-81/+245
|\ \ | | | | | | | | | | | | | | | | | | | | | 1411: add analysis-bench to benchmark incremental analysis r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | add analysis-bench to benchmark incremental analysisAleksey Kladov2019-06-169-81/+245
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Can be used like this: ``` $ cargo run --release -p ra_cli -- \ analysis-bench ../chalk/ \ --complete ../chalk/chalk-engine/src/logic.rs:94:0 loading: 225.970093ms from scratch: 8.492373325s no change: 445.265µs trivial change: 95.631242ms ``` Or like this: ``` $ cargo run --release -p ra_cli -- \ analysis-bench ../chalk/ \ --highlight ../chalk/chalk-engine/src/logic.rs loading: 209.873484ms from scratch: 9.504916942s no change: 7.731119ms trivial change: 124.984039ms ``` "from scratch" includes initial analysis of the relevant bits of the project "no change" just asks the same question for the second time. It measures overhead on assembling the answer outside of salsa. "trivial change" doesn't do an actual salsa change, it just advances the revision. This test how fast is salsa at validating things.
* | Merge #1408bors[bot]2019-06-1619-70/+454
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 1408: Associated type basics & Deref support r=matklad a=flodiebold This adds the necessary Chalk integration to handle associated types and uses it to implement support for `Deref` in the `*` operator and autoderef; so e.g. dot completions through an `Arc` work now. It doesn't yet implement resolution of associated types in paths, though. Also, there's a big FIXME about handling variables in the solution we get from Chalk correctly. Co-authored-by: Florian Diebold <[email protected]>
| * | Add test for autoderef infinite recursionFlorian Diebold2019-06-161-0/+25
| | |
| * | Simplifications / cleanup from reviewFlorian Diebold2019-06-167-38/+31
| | |
| * | Some more cleanupFlorian Diebold2019-06-151-4/+4
| | |
| * | Check that Deref has the right number of parametersFlorian Diebold2019-06-151-2/+7
| | |
| * | Somewhat handle variables in the derefed type, and add another testFlorian Diebold2019-06-153-5/+61
| | |
| * | Implement * operation using Deref traitFlorian Diebold2019-06-151-3/+5
| | |
| * | Implement autoderef using the Deref traitFlorian Diebold2019-06-1511-47/+152
| | | | | | | | | | | | - add support for other lang item targets, since we need the Deref lang item
| * | Add basic infrastructure for assoc type projectionFlorian Diebold2019-06-159-21/+190
| | |