Anatol Ulrich
83927e08a8
Update crates/ide/src/rename.rs
...
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-11-03 15:44:32 +01:00
Lukas Wirth
9025f51118
Add disjoint check back in TextEdit::union
2021-11-03 14:42:15 +01:00
Anatol Ulrich
7581ba3f30
forgot a dbg
2021-11-03 14:21:29 +01:00
Anatol Ulrich
9bce4d6696
accept identical Indels when merging; add rename test case
2021-11-02 21:38:38 +01:00
Anatol Ulrich
1ac35532c4
remove TODO comment
2021-10-27 17:26:38 +02:00
Anatol Ulrich
df9fb9b159
re-introduce always!
2021-10-27 17:25:42 +02:00
Anatol Ulrich
28c73f8374
unwrap--
2021-10-27 17:23:23 +02:00
Anatol Ulrich
4a1a5ff54e
fix logic error: alias detection was too lenient
2021-10-27 17:20:12 +02:00
Anatol Ulrich
6cd15c296d
wip
2021-10-27 15:40:49 +02:00
Anatol Ulrich
8d3ac328ee
remove resolved TODO questions
2021-10-27 15:40:30 +02:00
Anatol Ulrich
f244ed6a1a
doxx
2021-10-27 04:46:02 +02:00
Anatol Ulrich
2e0610e64e
one down
2021-10-27 04:42:58 +02:00
Anatol Ulrich
95199ac30b
make imports less odd
2021-10-27 04:36:32 +02:00
Anatol Ulrich
6decfceae1
WIP: fix: make rename
multi-token mapping aware
2021-10-27 04:31:14 +02:00
bors[bot]
a3830dfd3b
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>
2021-10-26 18:18:22 +00:00
Anatol Ulrich
b42093915a
Update crates/ide/src/expand_macro.rs
...
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-26 20:17:47 +02:00
Anatol Ulrich
e6913be47b
fix test
2021-10-26 20:15:25 +02:00
Anatol Ulrich
04f2eb0fba
wording
2021-10-26 20:10:09 +02:00
Anatol Ulrich
3f82989153
fix: make expand_macro
multi-token mapping aware
2021-10-26 20:09:14 +02:00
bors[bot]
c48730cb72
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>
2021-10-26 17:51:33 +00:00
Anatol Ulrich
53be26df50
assume valid identifier
2021-10-26 19:33:50 +02:00
Anatol Ulrich
d8ed15b6a6
fix: make goto_declaration
multi-token mapping aware
2021-10-26 19:31:49 +02:00
bors[bot]
ba2b599131
Merge #10592
...
10592: Fix: only shows one # when we encounter ## r=Veykril a=dzvon
Fixes #10584
Co-authored-by: Dezhi Wu <wu543065657@163.com>
2021-10-26 13:17:13 +00:00
Dezhi Wu
31af94b73a
perf: avoid allocating by just slicing.
...
Signed-off-by: Dezhi Wu <wu543065657@163.com>
2021-10-26 20:59:48 +08:00
bors[bot]
ee1d6cffbf
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>
2021-10-26 10:46:33 +00:00
Anatol Ulrich
c69879423e
fix imports
2021-10-26 12:34:40 +02:00
Anatol Ulrich
686f8fbea3
simplify
2021-10-26 12:21:18 +02:00
Anatol Ulrich
2490807ca5
fix: make goto_type_definition
multi-token mapping aware
2021-10-25 23:43:58 +02:00
bors[bot]
ed39b45e8d
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>
2021-10-25 19:47:41 +00:00
Lukas Wirth
a2365ea18a
fix: fix extract_variable not working on macro_call
2021-10-25 21:46:44 +02:00
bors[bot]
e4ca952be6
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>
2021-10-25 15:33:41 +00:00
bors[bot]
aa04d3eb4f
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>
2021-10-25 15:13:34 +00:00
Laurențiu Nicola
0e0ad0377c
Drop resolver and authors manifest entries
2021-10-25 18:12:40 +03:00
Lukas Wirth
d2b8ca9b52
fix: Implement most proc_macro span handling for other ABIs
2021-10-25 16:43:49 +02:00
bors[bot]
142b6dc650
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>
2021-10-25 13:24:07 +00:00
Lukas Wirth
a932935d4e
Fix postfix completions panicking
2021-10-25 15:22:29 +02:00
bors[bot]
e81e3c3980
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>
2021-10-25 12:50:17 +00:00
Lukas Wirth
4c582ffe9f
Don't ask the user to reload when chaning HoverAction configs in VSCode
2021-10-25 14:48:36 +02:00
bors[bot]
1f47693e02
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>
2021-10-24 11:53:51 +00:00
Laurențiu Nicola
f0ad6fa68b
Revert edition change in test
2021-10-24 14:52:42 +03:00
bors[bot]
9d33d05d85
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>
2021-10-23 13:30:32 +00:00
Laurențiu Nicola
8457ae34bd
Set MSRV
2021-10-23 15:07:11 +03:00
bors[bot]
fe7c516084
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>
2021-10-23 08:34:51 +00:00
bors[bot]
a75353e8ac
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>
2021-10-22 09:29:16 +00:00
vi_mi
3e73a46660
fix: making tests compatible with new trimmed sel_range
2021-10-22 09:16:56 +00:00
bors[bot]
dc5afb1573
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>
2021-10-22 07:18:05 +00:00
Paweł Palenica
bfc86f64c3
apply code review suggestions
2021-10-21 23:42:14 -07:00
bors[bot]
bbbb0e5f9a
Merge #10610
...
10610: minor: Use array `IntoIter` r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-10-22 06:24:17 +00:00
Laurențiu Nicola
ca44b6892e
Use array IntoIter
2021-10-22 09:23:29 +03:00
Jan Scheer
1bfedc3591
Amend the instruction for rustup.
...
The current instruction for installation via rustup are misleading.
2021-10-21 23:04:43 +02:00