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 <bors@rust-lang.org>2019-01-22 19:18:39 +0000
committerbors <bors@rust-lang.org>2019-01-22 19:18:39 +0000
commita40d8e447924c377711a61045c37f0e4f88ccc63 (patch)
tree268639fff0d2ec524528a2f8bb7ffd68b4a027da /tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff
parent280069ddc750d8a20d075c76322c45d5db4a48f8 (diff)
parent42d5a07f0ca4d0a3d17f2d2634862dc73bf82d2f (diff)
downloadrust-a40d8e447924c377711a61045c37f0e4f88ccc63.tar.gz
rust-a40d8e447924c377711a61045c37f0e4f88ccc63.zip
Auto merge of #3679 - daxpedda:use_self, r=phansch
Fix automatic suggestion on `use_self`.

In an example like this:
```rust
impl Example {
    fn fun_1() { }
    fn fun_2() {
        Example::fun_1();
    }
}
```
Clippy tries to replace `Example::fun_1` with `Self`, loosing `::fun_1` in the process, it should rather try to replace `Example` with `Self`.

**Question**
- There may be other paths that need the same treatment, but I'm not sure I understand them fully:
  - https://github.com/rust-lang/rust-clippy/blob/e648adf0866a1cea7db6ce2d33ea86e442f25377/clippy_lints/src/use_self.rs#L94-L96
  - https://github.com/rust-lang/rust-clippy/blob/e648adf0866a1cea7db6ce2d33ea86e442f25377/clippy_lints/src/use_self.rs#L225-L229
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff')
0 files changed, 0 insertions, 0 deletions