Commit Graph

723 Commits

Author SHA1 Message Date
Chayim Refael Friedman
6c287e1504 Accept E<error_number> notation in doctests
```compile_fail,E0000
```

The code was stolen from rustdoc at 392ba2ba1a/src/librustdoc/html/markdown.rs (L866-L867)
2021-04-18 06:15:40 +03:00
Jonas Schievink
ff858376aa Include path in unresolved-macro-call diagnostic 2021-04-16 15:48:03 +02:00
Jonas Schievink
30aae2cefb Move cursor position when using item movers 2021-04-14 00:03:04 +02:00
Jonas Schievink
43071e81a6 internal: follow test style guide in typing.rs 2021-04-13 14:31:05 +02:00
bors[bot]
03e0bf7f55
Merge #8354
8354: Distinguishing between different operators in semantic highlighting r=matklad a=chetankhilosiya



Co-authored-by: Chetan Khilosiya <chetan.khilosiya@gmail.com>
2021-04-13 11:46:23 +00:00
bors[bot]
0c02208fd8
Merge #8489
8489: Indent block expressions on enter r=matklad a=jonas-schievink

This improves on https://github.com/rust-analyzer/rust-analyzer/pull/8388 by also indenting the created block expression on enter.

![on enter](https://user-images.githubusercontent.com/1786438/114444123-cb38d600-9bce-11eb-8af2-8e8d1c0f9908.gif)


Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-04-13 10:06:36 +00:00
bors[bot]
d8120ed1a0
Merge #8500
8500: internal: fix flakiness of accidentally quadratic test r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-04-13 09:56:45 +00:00
Aleksey Kladov
327323ad25 internal: fix flakiness of accidentally quadratic test 2021-04-13 12:56:24 +03:00
Aleksey Kladov
db2a989565 internal: don't use #[should_panic] for tests 2021-04-13 12:21:59 +03:00
Aleksey Kladov
06a633ff42 feat: improve performance by delaying computation of fixes for diagnostics 2021-04-13 12:09:04 +03:00
Aleksey Kladov
04b5fcfdb2 Ensure that listing&resolving code actions use the same set of actions 2021-04-13 11:27:00 +03:00
Jonas Schievink
a8ca4666f1 Add a cov_mark 2021-04-13 00:51:10 +02:00
Jonas Schievink
89f015ead9 Simplify multiline check 2021-04-12 21:41:44 +02:00
Jonas Schievink
dd1832c016 Indent block expressions on enter 2021-04-12 20:35:38 +02:00
Jakub Kądziołka
2f60cec3ac
Fix typo: liner -> linear
🙈
2021-04-12 20:20:25 +02:00
Aleksey Kladov
426d098bd6 internal: prepare for lazy diagnostics 2021-04-12 17:58:01 +03:00
Jonas Schievink
e2c1da36f5 Support macros in pattern position 2021-04-11 01:25:50 +02:00
Aleksey Kladov
e012efca27 Let's try testing for "is not quadratic" condition 2021-04-10 12:43:07 +03:00
Jonas Schievink
ac980e96e5 Shrink unlinked-file diagnostic to 3 characters 2021-04-09 14:22:38 +02:00
bors[bot]
354151df35
Merge #8429
8429: 8425: Added documentation for on enter covering //! doc comments. r=jonas-schievink a=chetankhilosiya

Also added passing test case.

Co-authored-by: Chetan Khilosiya <chetan.khilosiya@gmail.com>
2021-04-08 23:33:36 +00:00
Chetan Khilosiya
4a9dd149aa 8024: Added the trait modifier for assoc types. 2021-04-09 01:00:35 +05:30
Chetan Khilosiya
a8b5400cc6 8425: Added documentation for on enter covering //! doc comments.
Also added passing test case.
2021-04-09 00:31:07 +05:30
Chetan Khilosiya
b232549653 8279: Fix the not operator use and test case fix. 2021-04-08 22:58:26 +05:30
Chetan Khilosiya
1735b3ef6a 8279: Added initial implementation for
Operator semantic highlighting.
2021-04-08 22:58:26 +05:30
bors[bot]
94d9fc2a28
Merge #8421
8421: Reduce allocations in "Expand macro" formatter r=edwin0cheng a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-04-08 15:43:30 +00:00
Laurențiu Nicola
48b946bde1 Reduce allocations in Expand macro 2021-04-08 17:37:43 +03:00
Lukas Wirth
4b555ab1d9 Emit folding ranges for multiline array literals 2021-04-08 00:12:11 +02:00
Jonas Schievink
d789cf8f31 Document } insertion 2021-04-07 17:19:42 +02:00
Jonas Schievink
39d59fb06f Make better use of stdx::always 2021-04-07 16:44:25 +02:00
Jonas Schievink
3f599ae4ed Rewrite, reparse modified file 2021-04-07 16:38:04 +02:00
Jonas Schievink
17a1011a12 simplify 2021-04-07 16:38:04 +02:00
Jonas Schievink
d75cacc601 Use stdx::always 2021-04-07 16:38:04 +02:00
Jonas Schievink
61e292fab1 Complete braces more aggressively 2021-04-07 16:38:04 +02:00
Jonas Schievink
36cd724b7b Autoclose blocks when typing { 2021-04-07 16:38:04 +02:00
Emmanuel Thompson
35bec31bca Add space after lifetime
In macro expansion, this lead to invalid syntax
2021-04-06 23:22:44 -04:00
bors[bot]
c2be91dcd8
Merge #8245
8245: Properly resolve intra doc links in hover and goto_definition r=matklad a=Veykril

Unfortunately involves a bit of weird workarounds due to pulldown_cmark's incorrect lifetimes on `BrokenLinkCallback`... I should probably open an issue there asking for the fixes to be pushed to a release since they already exist in the repo for quite some time it seems.

Fixes #8258, Fixes #8238

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-04-05 12:30:20 +00:00
Florian Diebold
cd227f581e Add and start using TraitRef and ProjectionTy builders 2021-04-04 13:16:38 +02:00
Edwin Cheng
b636080f67 Fix joinLines panic if run on the empty last line 2021-04-03 11:20:16 +08:00
Jonas Schievink
7ceaba21df Only populate prelude for crate-level DefMaps 2021-04-02 19:00:26 +02:00
bors[bot]
5ef0c7a213
Merge #8283
8283: Resolve associated types r=flodiebold a=Veykril

Prior we were only resolving paths until the first type was found, then discarding the result if the path wasn't fully consumed. That of course causes associated types to not resolve. Fixes #5003

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-04-01 21:11:06 +00:00
Lukas Wirth
9fe10a9606 Resolve associated types with type anchors 2021-04-01 21:52:07 +02:00
Lukas Wirth
444f6caaba Resolve associated types 2021-04-01 21:31:25 +02:00
Ayomide Bamidele
7bea1d8bfe Additional syntax highlighting screenshot in manual 2021-03-31 18:45:15 +01:00
Ayomide Bamidele
4296cc3318 Gif of "let = " typing assist 2021-03-31 16:39:04 +01:00
Ayomide Bamidele
d82176c146 Gifs and screenshots for features in manual (syntax highlighting and typing) 2021-03-31 16:20:54 +01:00
bors[bot]
55d7d71590
Merge #8267
8267: Adding gifs and screenshots for features in manual r=matklad a=MozarellaMan

For #6539

This includes most of gif or screenshot examples of most items in the "Features" header. With the exceptions of:

- **On Typing Assists** - couldn't get it to work for a demo, I'm probably missing something?
- **Structural search and replace** - looked to be already a visual example of the feature
- **Workspace symbol** - wasn't sure how best to show this, all of the examples maybe? Also wasn't sure of the best code example to show it off
- **Semantic Syntax Highlighting** - seemed obvious enough to not need a screenshot, but I could easily add this

All the gifs/pngs are hosted in this [comment](https://github.com/rust-analyzer/rust-analyzer/issues/6539#issuecomment-809574840). Please let me know if any of them aren't suitable (and why) and I'll improve it! Or if you don't like the theme/font

Co-authored-by: Ayomide Bamidele <48062697+MozarellaMan@users.noreply.github.com>
2021-03-31 10:01:56 +00:00
Ayomide Bamidele
276022682b Gifs and screenshots for features in manual 2021-03-31 00:08:10 +01:00
Lukas Wirth
8d786dc4c3 Replace Range<usize> usage with TextRange 2021-03-30 22:42:21 +02:00
Chetan Khilosiya
518c9c7548 Revert "8024: Added test case for highlighting trait items."
This reverts commit d7dcd41801.
2021-03-31 01:46:01 +05:30
Chetan Khilosiya
d0fcd5c5e0 8024: Fix for function name change. 2021-03-31 00:47:37 +05:30