Commit Graph

19942 Commits

Author SHA1 Message Date
Laurențiu Nicola
24eca25d8a Make some functions non-generic 2021-10-20 20:20:17 +03:00
bors[bot]
c2e36291f3
Merge #10598
10598: minor: Remove obsolete test module r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-20 15:03:36 +00:00
Lukas Wirth
96fbef606a Remove obsolete test module 2021-10-20 17:03:09 +02:00
bors[bot]
25a498bfc7
Merge #10597
10597: fix: Fix standard library doclinks not going to the correct page r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10082
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-20 14:46:28 +00:00
Lukas Wirth
8ed86fc25d Fix standard library doclinks not going to the correct page 2021-10-20 16:36:01 +02:00
Dezhi Wu
1a24ee9a1b Fix a format error 2021-10-20 20:13:03 +08:00
bors[bot]
c73aa7a214
Merge #10594
10594: fix: Generate and complete rustdoc lints r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10572, https://github.com/rust-analyzer/rust-analyzer/issues/8349
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-20 12:05:54 +00:00
Lukas Wirth
bed6eae304 Fix qualified lint completions ignoring the qualifier value 2021-10-20 14:03:41 +02:00
Lukas Wirth
6c9b8d7ce5 Generate rustdoc lints 2021-10-20 13:48:05 +02:00
Dezhi Wu
b7b9cd5e67 Fix: only shows one # when we encounter ## 2021-10-20 15:05:32 +08:00
bors[bot]
5051717856
Merge #10589
10589: Fix: expand into {} if the glob import is unused r=lnicola a=rainy-me

close #10524 

I think the second `expand into {}` behavior is genuinely better. (maybe this should been labeled with good first issue xd)

Co-authored-by: rainy-me <github@yue.coffee>
2021-10-19 14:53:00 +00:00
rainy-me
1ea2c72386 Fix: remove extra newline 2021-10-19 23:46:43 +09:00
rainy-me
adb3729b91 Fix: expand glob import to empty braces if the glob is unused 2021-10-19 23:31:30 +09:00
bors[bot]
580a6c41eb
Merge #10568
10568: fix(assist): fix #10566 and #10567 r=bnjjj a=bnjjj

close #10566
close #10567

Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2021-10-19 12:57:24 +00:00
Benjamin Coenen
3a5147e9fe fix(assist): delete trailing whitespaces
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2021-10-19 14:54:29 +02:00
bors[bot]
dfa355b431
Merge #10588
10588: internal: Parse const trait bounds r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10582
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-19 12:32:30 +00:00
Lukas Wirth
b219a4c465 internal: Parse const trait bounds 2021-10-19 14:20:00 +02:00
bors[bot]
e77fc481ad
Merge #10587
10587: fix: Fix `add_missing_match_arm` panicking on failed upmapping r=Veykril a=Veykril

Closes https://github.com/rust-analyzer/rust-analyzer/issues/10580#issuecomment-946170475

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-19 12:16:30 +00:00
Lukas Wirth
7e1d6e5265 fix: Fix add_missing_match_arm panicking 2021-10-19 14:00:24 +02:00
bors[bot]
0e4c3b2c2b
Merge #10586
10586: internal: Derive completions work on hir, not names r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-19 11:51:07 +00:00
Lukas Wirth
3dfe5045c5 Derive completions work on hir, not names 2021-10-19 13:50:08 +02:00
bors[bot]
d85946b735
Merge #10585
10585: fix: Resolve derive attributes even when shadowed r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-19 11:43:08 +00:00
Lukas Wirth
aa9d093488 Resolve derive attributes even when shadowed 2021-10-19 13:42:36 +02:00
bors[bot]
87d5ef8c4a
Merge #10578
10578: Fix partialord codegen take 2 r=lnicola a=yoshuawuyts

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10576. This reverts "generate `PartialOrd` to our previous match-based design, and in turn uses that to correctly take references for multi-value comparisons. This is a bit more verbose, but it should be more readable and easier to edit by end-users than multiple nested layers of borrows. I also manually verified every example in the Rust playground to ensure it works. Thanks!

cc/ `@WaffleLapkin` 

Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2021-10-18 12:56:33 +00:00
Yoshua Wuyts
e346d32e69 fix Ordering::Equal path 2021-10-18 14:45:24 +02:00
Yoshua Wuyts
41fd824415 Revert "Simplify generated PartialOrd code"
This reverts commit 601ed3a10d.
2021-10-18 14:41:38 +02:00
bors[bot]
48c3be922e
Merge #10574
10574: fix: Fix PartialOrd codegen r=lnicola a=yoshuawuyts

Closes https://github.com/rust-analyzer/rust-analyzer/issues/10571#issuecomment-945516462. Thanks!

r? `@lnicola` 

Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2021-10-18 10:47:04 +00:00
Yoshua Wuyts
a9ec345cf7 Fix PartialOrd codegen 2021-10-18 12:44:05 +02:00
bors[bot]
5ce9b04669
Merge #10551
10551: Pull in new lsp-types for VS compat r=lnicola a=lnicola

CC #8729

Depends on https://github.com/gluon-lang/lsp-types/pull/218

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-10-18 09:59:10 +00:00
Laurențiu Nicola
29d281e523 Fix tests 2021-10-18 12:03:49 +03:00
Laurențiu Nicola
edb03ad6f1 Pull in new lsp-types for VS compat 2021-10-18 12:03:49 +03:00
bors[bot]
91cbda43c2
Merge #10569
10569: fix: Skip non clippy completions when completing a clippy path r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-17 21:05:10 +00:00
Lukas Wirth
5704de66c2 Skip non clippy completions when completing a clippy path 2021-10-17 23:04:38 +02:00
Benjamin Coenen
7ee1a77235 fix(assist): fix #10566 and #10567
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2021-10-17 20:24:40 +02:00
Andrzej Głuszak
98676efdc5 Semantic getter 2021-10-17 16:33:14 +02:00
bors[bot]
401daa5f77
Merge #10417
10417: feat(assist): add new assist to unwrap the result return type r=bnjjj a=bnjjj

do the opposite of assist "wrap the return type in Result"

Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Coenen Benjamin <benjamin.coenen@hotmail.com>
2021-10-17 13:32:35 +00:00
Coenen Benjamin
ccf05debfe
Update crates/ide_assists/src/handlers/unwrap_result_return_type.rs
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-17 15:24:20 +02:00
bors[bot]
d9080addf9
Merge #10562
10562: fix: Fix clippy attribute completions always prefixing inserting `clippy::` r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/7144

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-17 11:30:49 +00:00
Lukas Wirth
99906baa17 Fix clippy attribute completions always prefixing with clippy:: 2021-10-17 13:07:49 +02:00
Lukas Wirth
ce47d13101 Make attribute completions more ast based 2021-10-17 12:44:44 +02:00
Lukas Wirth
e329b7742b Reorder CompletionContext functions 2021-10-17 11:15:56 +02:00
bors[bot]
c16d04e494
Merge #10561
10561: internal: Don't turn local names into strings in CompletionContext r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-17 09:00:06 +00:00
Lukas Wirth
791a2afbf9 Don't turn local names into strings in CompletionContext 2021-10-17 10:59:06 +02:00
bors[bot]
dd8e831c51
Merge #10558
10558: internal: Refactor lifetime completion context fields r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-16 21:57:36 +00:00
Lukas Wirth
81ccebf1f2 internal: Refactor lifetime completion context fields 2021-10-16 23:56:57 +02:00
bors[bot]
2d7d7f729d
Merge #10557
10557: fix: Fix qualified path completion not completing macros r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-16 21:33:55 +00:00
Lukas Wirth
2fbd52c78f fix: Fix qualified path completion not completing macros 2021-10-16 23:33:09 +02:00
bors[bot]
ebe9bcd28f
Merge #10556
10556: minor: more clippy fixes r=Veykril a=Milo123459

just a few more clippy fixes

Co-authored-by: Milo <50248166+Milo123459@users.noreply.github.com>
2021-10-16 14:21:35 +00:00
Milo
6f28325830 fix 2021-10-16 15:02:56 +01:00
Milo
30be95a821 add a comment 2021-10-16 14:15:17 +01:00