]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoMerge #10649
bors[bot] [Wed, 27 Oct 2021 15:38:42 +0000 (15:38 +0000)]
Merge #10649

10649: internal: Remove `CompletionKind` in favor of `CompletionItemKind` r=Veykril a=Veykril

and move some more tests around
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoRemove `CompletionKind` in favor of `CompletionItemKind`
Lukas Wirth [Wed, 27 Oct 2021 15:18:42 +0000 (17:18 +0200)]
Remove `CompletionKind` in favor of `CompletionItemKind`

2 years agoRemove filtered completion list usage in completion tests
Lukas Wirth [Wed, 27 Oct 2021 14:24:42 +0000 (16:24 +0200)]
Remove filtered completion list usage in completion tests

2 years agoMerge #10642
bors[bot] [Tue, 26 Oct 2021 18:55:42 +0000 (18:55 +0000)]
Merge #10642

10642: minor: Add dummy impls for `trace_macros` and `log_syntax` r=Veykril a=Veykril

Both of these are macros for debugging macros and as such don't really need an implementation for us.
Closes https://github.com/rust-analyzer/rust-analyzer/issues/2212
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoAdd dummy impls for `trace_macros` and `log_syntax`
Lukas Wirth [Tue, 26 Oct 2021 18:52:38 +0000 (20:52 +0200)]
Add dummy impls for `trace_macros` and `log_syntax`

2 years agoMerge #10641
bors[bot] [Tue, 26 Oct 2021 18:18:22 +0000 (18:18 +0000)]
Merge #10641

10641: fix: make `expand_macro` multi-token mapping aware r=spookyvision a=spookyvision

Co-authored-by: Anatol Ulrich <anatol.ulrich@ferrous-systems.com>
Co-authored-by: Anatol Ulrich <45840+spookyvision@users.noreply.github.com>
2 years agoUpdate crates/ide/src/expand_macro.rs
Anatol Ulrich [Tue, 26 Oct 2021 18:17:47 +0000 (20:17 +0200)]
Update crates/ide/src/expand_macro.rs

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agofix test
Anatol Ulrich [Tue, 26 Oct 2021 18:15:25 +0000 (20:15 +0200)]
fix test

2 years agowording
Anatol Ulrich [Tue, 26 Oct 2021 18:10:09 +0000 (20:10 +0200)]
wording

2 years agofix: make `expand_macro` multi-token mapping aware
Anatol Ulrich [Tue, 26 Oct 2021 18:09:14 +0000 (20:09 +0200)]
fix: make `expand_macro` multi-token mapping aware

2 years agoMerge #10639 #10640
bors[bot] [Tue, 26 Oct 2021 17:51:33 +0000 (17:51 +0000)]
Merge #10639 #10640

10639: fix: make `goto_declaration` multi-token mapping aware r=Veykril a=spookyvision

10640: assume valid identifier r=Veykril a=spookyvision

improve https://github.com/rust-analyzer/rust-analyzer/pull/10637/ by always returning `Some(potentially_empty_vec)` instead of `None` in the empty case

Co-authored-by: Anatol Ulrich <anatol.ulrich@ferrous-systems.com>
2 years agoassume valid identifier
Anatol Ulrich [Tue, 26 Oct 2021 17:33:50 +0000 (19:33 +0200)]
assume valid identifier

2 years agofix: make `goto_declaration` multi-token mapping aware
Anatol Ulrich [Tue, 26 Oct 2021 17:31:49 +0000 (19:31 +0200)]
fix: make `goto_declaration` multi-token mapping aware

2 years agoMerge #10592
bors[bot] [Tue, 26 Oct 2021 13:17:13 +0000 (13:17 +0000)]
Merge #10592

10592: Fix: only shows one # when we encounter ## r=Veykril a=dzvon

Fixes #10584

Co-authored-by: Dezhi Wu <wu543065657@163.com>
2 years agoperf: avoid allocating by just slicing.
Dezhi Wu [Tue, 26 Oct 2021 12:55:58 +0000 (20:55 +0800)]
perf: avoid allocating by just slicing.

Signed-off-by: Dezhi Wu <wu543065657@163.com>
2 years agoMerge #10637
bors[bot] [Tue, 26 Oct 2021 10:46:33 +0000 (10:46 +0000)]
Merge #10637

10637: fix: make `goto_type_definition` multi-token mapping aware r=Veykril a=spookyvision

Co-authored-by: Anatol Ulrich <anatol.ulrich@ferrous-systems.com>
2 years agofix imports
Anatol Ulrich [Tue, 26 Oct 2021 10:34:40 +0000 (12:34 +0200)]
fix imports

2 years agosimplify
Anatol Ulrich [Tue, 26 Oct 2021 10:21:18 +0000 (12:21 +0200)]
simplify

2 years agofix: make `goto_type_definition` multi-token mapping aware
Anatol Ulrich [Mon, 25 Oct 2021 21:43:58 +0000 (23:43 +0200)]
fix: make `goto_type_definition` multi-token mapping aware

2 years agoMerge #10635
bors[bot] [Mon, 25 Oct 2021 19:47:41 +0000 (19:47 +0000)]
Merge #10635

10635: fix: fix extract_variable not working on macro_call r=Veykril a=Veykril

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

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agofix: fix extract_variable not working on macro_call
Lukas Wirth [Mon, 25 Oct 2021 16:28:15 +0000 (18:28 +0200)]
fix: fix extract_variable not working on macro_call

2 years agoMerge #10633
bors[bot] [Mon, 25 Oct 2021 15:33:41 +0000 (15:33 +0000)]
Merge #10633

10633: fix: Implement most proc_macro span handling for other ABIs r=Veykril a=Veykril

Follow up to #10378
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoMerge #10634
bors[bot] [Mon, 25 Oct 2021 15:13:34 +0000 (15:13 +0000)]
Merge #10634

10634: minor: Drop resolver and `authors` manifest entry in `limit` r=lnicola a=lnicola

The new resolver is on by default in the 2021 edition,

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoDrop resolver and authors manifest entries
Laurențiu Nicola [Mon, 25 Oct 2021 15:09:34 +0000 (18:09 +0300)]
Drop resolver and authors manifest entries

2 years agofix: Implement most proc_macro span handling for other ABIs
Lukas Wirth [Mon, 25 Oct 2021 14:43:04 +0000 (16:43 +0200)]
fix: Implement most proc_macro span handling for other ABIs

2 years agoMerge #10631
bors[bot] [Mon, 25 Oct 2021 13:24:07 +0000 (13:24 +0000)]
Merge #10631

10631: fix: Fix postfix completions panicking r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10243, I couldn't reproduce the panic with the given snippet, but this change should still guard against it.
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoFix postfix completions panicking
Lukas Wirth [Mon, 25 Oct 2021 13:22:29 +0000 (15:22 +0200)]
Fix postfix completions panicking

2 years agoMerge #10630
bors[bot] [Mon, 25 Oct 2021 12:50:17 +0000 (12:50 +0000)]
Merge #10630

10630: fix: Don't ask the user to reload when chaning HoverAction configs in VSCode r=Veykril a=Veykril

To my knowledge, all of these are re-read on hover requests so there is no longer a reason to reload when changing these.
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoDon't ask the user to reload when chaning HoverAction configs in VSCode
Lukas Wirth [Mon, 25 Oct 2021 12:48:36 +0000 (14:48 +0200)]
Don't ask the user to reload when chaning HoverAction configs in VSCode

2 years agoMerge #10624
bors[bot] [Sun, 24 Oct 2021 11:53:51 +0000 (11:53 +0000)]
Merge #10624

10624: minor: revert edition change in test r=lnicola a=lnicola

Fixes https://github.com/rust-analyzer/rust-analyzer/pull/10607#discussion_r734963606

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoRevert edition change in test
Laurențiu Nicola [Sun, 24 Oct 2021 11:52:42 +0000 (14:52 +0300)]
Revert edition change in test

2 years agoMerge #10617
bors[bot] [Sat, 23 Oct 2021 13:30:32 +0000 (13:30 +0000)]
Merge #10617

10617: Set MSRV r=Veykril a=lnicola

Set the MSRV to `1.56` since we're already on the 2021 edition and building with older version fails.

From now on, there'll be a change in behavior: `xtask install` used to warn on old toolchains, but now the user will get an error. This isn't so bad because:

 - the check in `xtask install` wasn't always working (because sometimes `xtask` itself required a newer toolchain)
 - we generally bump the required version for a reason (when using a newer feature). We might forget to bump it, but when we do, older toolchains won't work

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoSet MSRV
Laurențiu Nicola [Sat, 23 Oct 2021 12:07:11 +0000 (15:07 +0300)]
Set MSRV

2 years agoMerge #10602
bors[bot] [Sat, 23 Oct 2021 08:34:51 +0000 (08:34 +0000)]
Merge #10602

10602: Add qualify method call assist r=Veykril a=qepasa

This adds `qualify_method_call` assist that allows to replace a method (or trait) call that resolves with its fully qualified path.

For example, for stuct method:
```rust
struct Foo;
impl Foo {
    fn foo(&self) {}
}
```
```
let foo = Foo {};
foo.fo$0o();
```

becomes
```rust
let foo = Foo {};
Foo::foo(&foo);
```

for a trait method:

```rust
struct Foo;
trait FooTrait {
    fn foo(&self) {}
}
impl FooTrait for Foo {
    fn foo(&self) {}
}
```
following call:
```rust
let foo = Foo {};
foo.fo$0o();
```

becomes:
```rust
let foo = Foo {};
FooTrait::foo(&foo);
```

fixes #10453

Co-authored-by: Paweł Palenica <pawelpalenica11@gmail.com>
2 years agoMerge #9939
bors[bot] [Fri, 22 Oct 2021 09:29:16 +0000 (09:29 +0000)]
Merge #9939

9939: feat: Adding extract_module assist r=Veykril a=feniljain

Should solve https://github.com/rust-analyzer/rust-analyzer/issues/9591

Co-authored-by: vi_mi <fenil.jain2018@vitstudent.ac.in>
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agofix: making tests compatible with new trimmed sel_range
vi_mi [Fri, 22 Oct 2021 08:55:47 +0000 (08:55 +0000)]
fix: making tests compatible with new trimmed sel_range

2 years agoMerge #10608
bors[bot] [Fri, 22 Oct 2021 07:18:05 +0000 (07:18 +0000)]
Merge #10608

10608: Amend the instruction for rustup. r=lnicola a=jhscheer

The current instruction for installation via rustup are misleading.

Co-authored-by: Jan Scheer <jhscheer@users.noreply.github.com>
2 years agoapply code review suggestions
Paweł Palenica [Fri, 22 Oct 2021 06:41:43 +0000 (23:41 -0700)]
apply code review suggestions

2 years agoMerge #10610
bors[bot] [Fri, 22 Oct 2021 06:24:17 +0000 (06:24 +0000)]
Merge #10610

10610: minor: Use array `IntoIter` r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoUse array IntoIter
Laurențiu Nicola [Fri, 22 Oct 2021 06:23:29 +0000 (09:23 +0300)]
Use array IntoIter

2 years agoAmend the instruction for rustup.
Jan Scheer [Thu, 21 Oct 2021 21:04:43 +0000 (23:04 +0200)]
Amend the instruction for rustup.

The current instruction for installation via rustup are misleading.

2 years agoMerge #10607
bors[bot] [Thu, 21 Oct 2021 18:19:22 +0000 (18:19 +0000)]
Merge #10607

10607: Migrate to edition 2021 r=Veykril a=Veykril

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoMigrate to edition 2021
Lukas Wirth [Thu, 21 Oct 2021 15:49:28 +0000 (17:49 +0200)]
Migrate to edition 2021

2 years agoMerge #10603
bors[bot] [Thu, 21 Oct 2021 10:39:26 +0000 (10:39 +0000)]
Merge #10603

10603: fix: Don't resolve attributes to non attribute macros r=Veykril a=Veykril

Also changes `const`s to `static`s for `Limit`s as we have interior mutability in those(though only used with a certain feature flag enabled).

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoDon't resolve attributes to non attribute macros
Lukas Wirth [Thu, 21 Oct 2021 10:21:34 +0000 (12:21 +0200)]
Don't resolve attributes to non attribute macros

2 years agoAdd generated docs
Paweł Palenica [Thu, 21 Oct 2021 06:54:22 +0000 (23:54 -0700)]
Add generated docs

2 years agocleanup qualify_path
Paweł Palenica [Thu, 21 Oct 2021 06:39:25 +0000 (23:39 -0700)]
cleanup qualify_path

2 years agoRemove comment
Paweł Palenica [Thu, 21 Oct 2021 06:38:28 +0000 (23:38 -0700)]
Remove comment

2 years agoCleanup - remove unnecessary pub
Paweł Palenica [Thu, 21 Oct 2021 06:37:31 +0000 (23:37 -0700)]
Cleanup - remove unnecessary pub

2 years agoRun cargo fmt
Paweł Palenica [Thu, 21 Oct 2021 06:35:14 +0000 (23:35 -0700)]
Run cargo fmt

2 years agoAdd qualify method call assist
Paweł Palenica [Thu, 21 Oct 2021 06:28:19 +0000 (23:28 -0700)]
Add qualify method call assist

2 years agoMerge #10563
bors[bot] [Wed, 20 Oct 2021 21:02:46 +0000 (21:02 +0000)]
Merge #10563

10563: feat: Make "Generate getter" assist use semantic info r=agluszak a=agluszak

This PR makes "Generate getter" assist use semantic info instead of dealing with types encoded as strings.
Getters for types which are:
- `Copy` no longer return references
- `AsRef<str>` (i.e. `String`) return `&str` (instead of `&String`)
- `AsRef<[T]>` (i.e. `Vec<T>`) return `&[T]` (instead of `&Vec<T>`)
- `AsRef<T>` (i.e. `Box<T>`) return `&T` (instead of `&Box<T>`)
- `Option<T>` return `Option<&T>` (instead of `&Option<T>`)
- `Result<T, E>` return `Result<&T, &E>` (instead of `&Result<T, E>`)

String, Vec, Box and Option were previously handled as special cases.

Closes #10295

Co-authored-by: Andrzej Głuszak <gluszak.andrzej@gmail.com>
2 years agoMerge #10387
bors[bot] [Wed, 20 Oct 2021 20:54:36 +0000 (20:54 +0000)]
Merge #10387

10387: Move `IdxRange` into la-arena r=Veykril a=arzg

Currently, `IdxRange` (named `IdRange`) is located in `hir_def::item_tree`, when really it isn’t specific to `hir_def` and could become part of la-arena. The rename from `IdRange` to `IdxRange` is to maintain consistency with the naming convention used throughout la-arena (`Idx` instead of `Id`, `RawIdx` instead of `RawId`). This PR also adds a few new APIs to la-arena on top of `IdxRange` for convenience, namely:

- indexing into an `Arena` by an `IdxRange` and getting a slice of values back
- creating an `IdxRange` from an inclusive range

Currently this PR also exposes a new `Arena::next_idx` method to make constructing inclusive`IdxRange`s using `IdxRange::new` easier; however, it would in my opinion be better to remove this as it allows for easy creation of out-of-bounds `Idx`s, when `IdxRange::new_inclusive` mostly covers the same use-case while being less error-prone.

I decided to bump the la-arena version to 0.3.0 from 0.2.0 because adding a new `Index` impl for `Arena` turned out to be a breaking change: I had to add a type hint in `crates/hir_def/src/body/scope.rs` when one wasn’t necessary before, since rustc couldn’t work out the type of a closure parameter now that there are multiple `Index` impls. I’m not sure whether this is the right decision, though.

Co-authored-by: Aramis Razzaghipour <aramisnoah@gmail.com>
2 years agoFixes
Andrzej Głuszak [Wed, 20 Oct 2021 20:35:31 +0000 (22:35 +0200)]
Fixes

2 years agoFixes
Andrzej Głuszak [Wed, 20 Oct 2021 19:35:35 +0000 (21:35 +0200)]
Fixes

2 years agoMerge #10600
bors[bot] [Wed, 20 Oct 2021 18:05:31 +0000 (18:05 +0000)]
Merge #10600

10600: minor: Make some functions non-generic r=Veykril a=lnicola

This reduces `text` size by 10192 bytes (0.064% :cry:), with no apparent change in performance.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoMake some functions non-generic
Laurențiu Nicola [Wed, 20 Oct 2021 17:20:17 +0000 (20:20 +0300)]
Make some functions non-generic

2 years agoMerge #10598
bors[bot] [Wed, 20 Oct 2021 15:03:36 +0000 (15:03 +0000)]
Merge #10598

10598: minor: Remove obsolete test module r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoRemove obsolete test module
Lukas Wirth [Wed, 20 Oct 2021 15:03:09 +0000 (17:03 +0200)]
Remove obsolete test module

2 years agoMerge #10597
bors[bot] [Wed, 20 Oct 2021 14:46:28 +0000 (14:46 +0000)]
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>
2 years agoFix standard library doclinks not going to the correct page
Lukas Wirth [Wed, 20 Oct 2021 14:21:33 +0000 (16:21 +0200)]
Fix standard library doclinks not going to the correct page

2 years agoMerge #10594
bors[bot] [Wed, 20 Oct 2021 12:05:54 +0000 (12:05 +0000)]
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>
2 years agoFix qualified lint completions ignoring the qualifier value
Lukas Wirth [Wed, 20 Oct 2021 12:03:41 +0000 (14:03 +0200)]
Fix qualified lint completions ignoring the qualifier value

2 years agoGenerate rustdoc lints
Lukas Wirth [Wed, 20 Oct 2021 11:48:05 +0000 (13:48 +0200)]
Generate rustdoc lints

2 years agoFix: only shows one # when we encounter ##
Dezhi Wu [Wed, 20 Oct 2021 07:05:32 +0000 (15:05 +0800)]
Fix: only shows one # when we encounter ##

2 years agoMerge #10589
bors[bot] [Tue, 19 Oct 2021 14:53:00 +0000 (14:53 +0000)]
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>
2 years agoFix: remove extra newline
rainy-me [Tue, 19 Oct 2021 14:46:43 +0000 (23:46 +0900)]
Fix: remove extra newline

2 years agoFix: expand glob import to empty braces if the glob is unused
rainy-me [Tue, 19 Oct 2021 14:31:30 +0000 (23:31 +0900)]
Fix: expand glob import to empty braces if the glob is unused

2 years agoMerge #10568
bors[bot] [Tue, 19 Oct 2021 12:57:24 +0000 (12:57 +0000)]
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>
2 years agofix(assist): delete trailing whitespaces
Benjamin Coenen [Tue, 19 Oct 2021 09:21:55 +0000 (11:21 +0200)]
fix(assist): delete trailing whitespaces

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2 years agoMerge #10588
bors[bot] [Tue, 19 Oct 2021 12:32:30 +0000 (12:32 +0000)]
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>
2 years agointernal: Parse const trait bounds
Lukas Wirth [Tue, 19 Oct 2021 12:15:47 +0000 (14:15 +0200)]
internal: Parse const trait bounds

2 years agoMerge #10587
bors[bot] [Tue, 19 Oct 2021 12:16:30 +0000 (12:16 +0000)]
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>
2 years agofix: Fix add_missing_match_arm panicking
Lukas Wirth [Tue, 19 Oct 2021 12:00:24 +0000 (14:00 +0200)]
fix: Fix add_missing_match_arm panicking

2 years agoMerge #10586
bors[bot] [Tue, 19 Oct 2021 11:51:07 +0000 (11:51 +0000)]
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>
2 years agoDerive completions work on hir, not names
Lukas Wirth [Tue, 19 Oct 2021 11:50:08 +0000 (13:50 +0200)]
Derive completions work on hir, not names

2 years agoMerge #10585
bors[bot] [Tue, 19 Oct 2021 11:43:08 +0000 (11:43 +0000)]
Merge #10585

10585: fix: Resolve derive attributes even when shadowed r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoResolve derive attributes even when shadowed
Lukas Wirth [Tue, 19 Oct 2021 11:40:27 +0000 (13:40 +0200)]
Resolve derive attributes even when shadowed

2 years agoMerge #10578
bors[bot] [Mon, 18 Oct 2021 12:56:33 +0000 (12:56 +0000)]
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>
2 years agofix Ordering::Equal path
Yoshua Wuyts [Mon, 18 Oct 2021 12:45:24 +0000 (14:45 +0200)]
fix Ordering::Equal path

2 years agoRevert "Simplify generated PartialOrd code"
Yoshua Wuyts [Mon, 18 Oct 2021 12:38:53 +0000 (14:38 +0200)]
Revert "Simplify generated PartialOrd code"

This reverts commit 601ed3a10dacc2ba2ee0ca436c23529ae7fde292.

2 years agoMerge #10574
bors[bot] [Mon, 18 Oct 2021 10:47:04 +0000 (10:47 +0000)]
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>
2 years agoFix PartialOrd codegen
Yoshua Wuyts [Mon, 18 Oct 2021 10:43:53 +0000 (12:43 +0200)]
Fix PartialOrd codegen

2 years agoMerge #10551
bors[bot] [Mon, 18 Oct 2021 09:59:10 +0000 (09:59 +0000)]
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>
2 years agoFix tests
Laurențiu Nicola [Fri, 15 Oct 2021 17:28:28 +0000 (20:28 +0300)]
Fix tests

2 years agoPull in new lsp-types for VS compat
Laurențiu Nicola [Thu, 14 Oct 2021 06:37:57 +0000 (09:37 +0300)]
Pull in new lsp-types for VS compat

2 years agoMerge #10569
bors[bot] [Sun, 17 Oct 2021 21:05:10 +0000 (21:05 +0000)]
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>
2 years agoSkip non clippy completions when completing a clippy path
Lukas Wirth [Sun, 17 Oct 2021 21:04:38 +0000 (23:04 +0200)]
Skip non clippy completions when completing a clippy path

2 years agofix(assist): fix #10566 and #10567
Benjamin Coenen [Sun, 17 Oct 2021 18:24:40 +0000 (20:24 +0200)]
fix(assist): fix #10566 and #10567

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2 years agoSemantic getter
Andrzej Głuszak [Wed, 29 Sep 2021 12:04:32 +0000 (14:04 +0200)]
Semantic getter

2 years agoMerge #10417
bors[bot] [Sun, 17 Oct 2021 13:32:35 +0000 (13:32 +0000)]
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>
2 years agoUpdate crates/ide_assists/src/handlers/unwrap_result_return_type.rs
Coenen Benjamin [Sun, 17 Oct 2021 13:24:20 +0000 (15:24 +0200)]
Update crates/ide_assists/src/handlers/unwrap_result_return_type.rs

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoMerge #10562
bors[bot] [Sun, 17 Oct 2021 11:30:49 +0000 (11:30 +0000)]
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>
2 years agoFix clippy attribute completions always prefixing with `clippy::`
Lukas Wirth [Sun, 17 Oct 2021 10:58:37 +0000 (12:58 +0200)]
Fix clippy attribute completions always prefixing with `clippy::`

2 years agoMake attribute completions more ast based
Lukas Wirth [Sun, 17 Oct 2021 10:44:41 +0000 (12:44 +0200)]
Make attribute completions more ast based

2 years agoReorder CompletionContext functions
Lukas Wirth [Sun, 17 Oct 2021 09:15:56 +0000 (11:15 +0200)]
Reorder CompletionContext functions

2 years agoMerge #10561
bors[bot] [Sun, 17 Oct 2021 09:00:06 +0000 (09:00 +0000)]
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>
2 years agoDon't turn local names into strings in CompletionContext
Lukas Wirth [Sun, 17 Oct 2021 08:59:06 +0000 (10:59 +0200)]
Don't turn local names into strings in CompletionContext

2 years agoMerge #10558
bors[bot] [Sat, 16 Oct 2021 21:57:36 +0000 (21:57 +0000)]
Merge #10558

10558: internal: Refactor lifetime completion context fields r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agointernal: Refactor lifetime completion context fields
Lukas Wirth [Sat, 16 Oct 2021 21:56:43 +0000 (23:56 +0200)]
internal: Refactor lifetime completion context fields