about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-10-23 08:34:51 +0000
committerGitHub <noreply@github.com>2021-10-23 08:34:51 +0000
commitfe7c5160846251f6f3f62b4a02f99f5fafa38cfa (patch)
tree74f2980dc56dbffd1920aa404906e822a589b406 /tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff
parenta75353e8acc63d660b2bcb2e70f496ddc0567789 (diff)
parentbfc86f64c3f1498ce0939ab75e301a20cb03b36b (diff)
downloadrust-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 'tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff')
0 files changed, 0 insertions, 0 deletions