Commit graph

749 commits

Author SHA1 Message Date
Lukas Tobias Wirth
3f796fea9f simplify 2021-05-05 22:55:12 +02:00
bors[bot]
d9f1b5fc7c
Merge #8719
8719: Fix block comment intra doc link injection ranges r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Tobias Wirth <lukastw97@gmail.com>
2021-05-04 12:00:30 +00:00
Lukas Tobias Wirth
5a78d96d0e Fix block comment intra doc link injection ranges 2021-05-04 13:51:57 +02:00
Kirill Bulatov
53a73de3d1 Small fixes 2021-05-03 18:45:30 +03:00
Kirill Bulatov
8089a227f4 Tests added 2021-05-03 18:40:04 +03:00
Kirill Bulatov
28293d370f Add docs and use better naming 2021-05-03 18:16:35 +03:00
Kirill Bulatov
1679a376f3 Resolve single assist only 2021-05-03 18:03:28 +03:00
Kirill Bulatov
e5cdcb8b12 Add a way to resolve certain assists 2021-05-03 17:14:49 +03:00
Aleksey Kladov
cd69307aee fix: don't duplicate Progerss::Finised for cache priming 2021-05-02 21:45:00 +03:00
Aleksey Kladov
1a01a5ae19 internal: fix naming polarity
Type Constructors have *parameters*, when they are substituted with type
*arguments*, we have a type.
2021-04-30 11:55:59 +03:00
Bastian Kersting
421cf9a1bd Fixed formatting 2021-04-26 11:37:28 +02:00
Bastian Kersting
336b81abd7 Added mutable semantic token modifier for &mut self methods 2021-04-26 09:24:18 +02:00
Danny Zhu
09fc5e1dd7 Check more carefully for cases where a rename can't be done
Attempting to rename an element of a tuple field would previously
replace the type with the new name, which doesn't make sense; now it
fails instead.

The check is done in both `prepare_rename` and `rename` so that the case
is caught before the user is prompted for a new name. Some other
existing failure cases are also now additionally checked in
`prepare_rename`.
2021-04-25 14:08:56 -07:00
Lukas Wirth
1e88f5ec8e Simplify highlight token match guards 2021-04-23 17:27:18 +02:00
Lukas Wirth
ef6f596b4b Sort HlMod variants and ALL const 2021-04-23 17:24:58 +02:00
Lukas Wirth
c005ce60a0 Tag yield and await as ControlFlow in semantic highlighting 2021-04-23 17:24:45 +02:00
Aleksey Kladov
cdfe5a8be0 fix: no more Registering progress handler for token rustAnalyzer/Indexing failed. 2021-04-20 22:54:05 +03:00
bors[bot]
b6a7276c54
Merge #8586
8586: Replace SyntaxRewriter usage with ted in eager::eager_macro_recur r=Veykril a=Veykril



Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-04-19 18:03:56 +00:00
Lukas Wirth
952fc23694 Replace SyntaxRewriter with ted in exppand_macro::expand_macro_recur 2021-04-19 19:43:26 +02:00
bors[bot]
2b5f35ca4b
Merge #8582
8582: Fix typo: comparision -> comparison r=kjeremy a=stanciuadrian

Closes #8576 

Co-authored-by: Adrian Stanciu <stanciu.adrian@gmail.com>
2021-04-19 15:47:18 +00:00
Adrian Stanciu
1c75d8975c Fix typo: comparision -> comparison 2021-04-19 18:44:38 +03:00
Lukas Wirth
6142afeafd Support crates/module roots in external_docs 2021-04-19 15:50:04 +02:00
Lukas Wirth
2f62c0117a Check for rust doc code attributes like rustdoc does 2021-04-19 13:32:52 +02:00
Lukas Wirth
8a959497b1 Don't require all doc fences to be valid for identifying rust code 2021-04-19 11:41:45 +02:00
bors[bot]
75bf832899
Merge #8540
8540: Prevent being able to rename items that are not part of the workspace r=Veykril a=Veykril

This change causes renames that happen on items coming from crates outside the workspace to fail. I believe this should be the right approach, but usage of cargo's workspace might not be entirely correct for preventing these kinds of refactoring from touching things they shouldn't. I'm not entirely sure?

cc #6623, this is one of the bigger footguns when it comes to refactoring, especially in combination with import aliases people tend to rename items coming from a crates dependency which this prevents.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-04-19 07:57:40 +00:00
Lukas Wirth
c447a795ab Prevent being able to rename items that are not part of the workspace 2021-04-18 12:44:00 +02:00
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