Commit Graph

15661 Commits

Author SHA1 Message Date
Kartavya Vashishtha
23c00ed50d
fix: formatting 2022-08-20 13:44:01 +05:30
Kartavya Vashishtha
8f87fcb179
remove push_diagnostic methods
weren't used in the end
2022-08-20 13:30:25 +05:30
Kartavya Vashishtha
87b779756c
make impl and trait inactive diagnostics work 2022-08-20 13:28:43 +05:30
Kartavya Vashishtha
c1eae3d028
make diagnostic function public 2022-08-08 16:45:27 +05:30
Kartavya Vashishtha
196f389a70
try adding diagnostrics for AssocItems 2022-08-08 16:40:29 +05:30
Kartavya Vashishtha
1883d1f141
activate assoc item test 2022-08-07 20:39:11 +05:30
bors
634cfe3d72 Auto merge of #12956 - oxalica:feat/la-arena-apis, r=lnicola
More methods and traits for `la_arena::ArenaMap`

Continue of #12931. Seems that I forgot some methods in the previous PR :(

I also changed `ArenaMap::insert` to return the old value, to match the map-like collection API of std. **So this is a breaking change.**

r? `@lnicola`
2022-08-07 08:50:23 +00:00
Laurențiu Nicola
eca6f2e897 Fix test_rainbow_highlighting gate 2022-08-07 09:29:26 +03:00
oxalica
326ffee5b7 Returns the old value for la_arena::ArenaMap::insert 2022-08-07 04:53:23 +08:00
Adrian Stanciu
e8a9bc09a3 run stable fmt through rustup 2022-08-06 17:25:02 +03:00
bors
3792720086 Auto merge of #12947 - Veykril:switch-workspace, r=Veykril
Don't switch workspace on vfs file changes from libraries

When r-a starts up, it starts switching the workspace before all vfs
events have been processed which causes us to switch workspace multiple
times until all vfs changes have been processed. This scales with the
size of the project and its dependencies. If workspace files from
dependencies as well as the sysroot get loaded, we shouldn't switch
the workspace as those have no impact on the project workspace.
2022-08-05 13:13:44 +00:00
bors
97038e55cf Auto merge of #12949 - Veykril:token-pick, r=Veykril
fix: Fix incorrect token pick rankings
2022-08-05 13:06:10 +00:00
Lukas Wirth
6bf674c8e4 fix: Fix incorrect token pick rankings 2022-08-05 14:59:26 +02:00
Lukas Wirth
8aa50e08af Simplify 2022-08-05 14:54:14 +02:00
Lukas Wirth
352d3c6e50 Fix visibilities 2022-08-05 14:28:36 +02:00
Lukas Wirth
d6e78b04d0 feat: Handle operators like their trait functions in the IDE 2022-08-05 14:16:36 +02:00
Lukas Wirth
6a1737242b Don't switch workspace on vfs file changes from libraries
When r-a starts up, it starts switching the workspace before all vfs
events have been processed which causes us to switch workspace multiple
times until all vfs changes have been processed. This scales with the
size of the project and its dependencies. If workspace files from
dependencies as well as the sysroot get loaded, we shouldn't switch
the workspace as those have no impact on the project workspace.
2022-08-05 12:06:42 +02:00
bors
0fe3bcfd35 Auto merge of #12808 - Veykril:check-workspace, r=Veykril
feat: Only flycheck workspace that belongs to saved file

Supercedes https://github.com/rust-lang/rust-analyzer/pull/11038

There is still the problem that all the diagnostics are cleared, only clearing diagnostics of the relevant workspace isn't easily doable though I think, will have to dig into that
2022-08-04 12:57:04 +00:00
Lukas Wirth
df7f755e3b Don't flycheck while the workspace is being loaded 2022-08-04 14:56:44 +02:00
Jean santos
5698e51027 tidy formatting 2022-08-04 09:28:34 -03:00
Lukas Wirth
df9d3db82f Trigger flycheck on all transitive dependencies as well 2022-08-04 13:22:15 +02:00
Jean santos
49dac4070c on hover fallback error, adds ast::type as possible node 2022-08-03 17:37:11 -03:00
bors
2bc9a2d9e0 Auto merge of #12933 - Veykril:proc-ignored, r=Veykril
Use an empty expander for ignored non-attribute proc-macros

Identity is the wrong behaviour for anything that's not an attribute here
2022-08-03 16:11:08 +00:00
Lukas Wirth
a8a6c160be Use an empty expander for ignored non-attribute proc-macros 2022-08-03 18:10:15 +02:00
Dorian Scheidt
1980c1192c Support PathPat paths in generate_enum_variant 2022-08-02 14:37:12 -04:00
Dorian Scheidt
111694d85b Be more strict about supported Paths in generate_enum_variant
PathType path parents don't support this assist
2022-08-02 14:37:12 -04:00
Dorian Scheidt
e4638def7a Support record fields in generate_enum_variant 2022-08-02 14:37:12 -04:00
Dorian Scheidt
15d8049fa9 Support tuple fields in generate_enum_variant 2022-08-02 14:37:12 -04:00
Dorian Scheidt
bea1fec7a2 convert generate_enum_variant to use add_variant 2022-08-02 14:37:12 -04:00
Dorian Scheidt
405dd77d30 Support adding variants via structural editing 2022-08-02 14:37:12 -04:00
bors
113f1dbc91 Auto merge of #12880 - palango:while-fixup, r=Veykril
Add syntax fixup for while loops

Part of https://github.com/rust-lang/rust-analyzer/issues/12777

This is a first iteration to gather some feedback. In particular I'm not sure if the curly braces should be added here, but I couldn't get the test to work without them. Any hints welcome!
2022-08-02 14:08:56 +00:00
Jonas Schievink
bd7dfac5eb Fix r-a spelling in some places 2022-08-01 13:47:09 +02:00
Ryo Yoshida
d40ab66186
fix: remove whitespaces from doctest names 2022-08-01 17:57:47 +09:00
bors
af646621de Auto merge of #12916 - Veykril:nits, r=Veykril
minor: Properly cfg the `max` field of Limit
2022-07-31 17:42:10 +00:00
Lukas Wirth
3b2ecf44a0 Give variables more descriptive names 2022-07-31 19:27:34 +02:00
Lukas Wirth
d31f3605ce Properly cfg the max field of Limit 2022-07-31 19:27:20 +02:00
bors
e0ff4befda Auto merge of #12913 - Veykril:attr-merge, r=Veykril
fix: Fix ast-id up when merging raw attributes

Fixes https://github.com/rust-lang/rust-analyzer/issues/12912
2022-07-30 07:53:48 +00:00
Lukas Wirth
618cfd792c fix: Fix ast-id up when merging raw attributes 2022-07-30 09:43:30 +02:00
cynecx
902fd6ddcd fix: complete path of existing record expr 2022-07-29 17:24:05 +02:00
Laurențiu Nicola
11ef494b37 Be more explicit when filtering built-in completions 2022-07-28 21:45:47 +03:00
Laurențiu Nicola
948c9afc73 Only run rainbow highlighting test on 64-bit Unix 2022-07-28 21:03:59 +03:00
bors
b8763fe224 Auto merge of #12902 - Veykril:item-scope, r=Veykril
fix: Order ItemScope::entries results
2022-07-28 17:38:59 +00:00
Lukas Wirth
f867ddc621 fix: Order ItemScope::entries results 2022-07-28 19:28:56 +02:00
bors
32e640e2ba Auto merge of #12901 - Veykril:completion-trait-expr, r=Veykril
fix: Don't complete marker traits in expression position

cc https://github.com/rust-lang/rust-analyzer/issues/12196
2022-07-28 15:51:30 +00:00
Lukas Wirth
ce7541260d fix: Don't complete marker traits in expression position 2022-07-28 17:50:49 +02:00
bors
5986d2190f Auto merge of #12899 - Veykril:compl-qualifier, r=Veykril
fix: Do completions in path qualifier position

Fixes https://github.com/rust-lang/rust-analyzer/issues/12566

Not too happy with the duplication needed for this, but it is what it is. Completions in path qualifiers will have to be filtered properly still, but its better to show too many completions for this than too few for now.
2022-07-28 15:11:24 +00:00
Lukas Wirth
74abd44a26 fix: Do completions in path qualifier position 2022-07-28 17:09:31 +02:00
bors
02c240ff81 Auto merge of #12898 - Veykril:compl-pat-brace, r=Veykril
fix: Fix pattern completions adding unnecessary braces

Fixes https://github.com/rust-lang/rust-analyzer/issues/12852
2022-07-28 13:48:12 +00:00
Lukas Wirth
7c59d7c75c fix: Fix pattern completions adding unnecessary braces 2022-07-28 15:47:46 +02:00
bors
02f9ec4be5 Auto merge of #12895 - Veykril:compl-anchor, r=Veykril
fix: Calculate completions after type anchors

Fixes https://github.com/rust-lang/rust-analyzer/issues/12892
2022-07-28 08:06:58 +00:00