diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-10-23 08:34:51 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-23 08:34:51 +0000 |
| commit | fe7c5160846251f6f3f62b4a02f99f5fafa38cfa (patch) | |
| tree | 74f2980dc56dbffd1920aa404906e822a589b406 /src/test/codegen | |
| parent | a75353e8acc63d660b2bcb2e70f496ddc0567789 (diff) | |
| parent | bfc86f64c3f1498ce0939ab75e301a20cb03b36b (diff) | |
| download | rust-fe7c5160846251f6f3f62b4a02f99f5fafa38cfa.tar.gz rust-fe7c5160846251f6f3f62b4a02f99f5fafa38cfa.zip | |
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>
Diffstat (limited to 'src/test/codegen')
0 files changed, 0 insertions, 0 deletions
