diff options
| author | bors <bors@rust-lang.org> | 2020-12-19 21:39:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-12-19 21:39:19 +0000 |
| commit | 9f9e9f7e52e46a029f4713b466a78268ff12c11f (patch) | |
| tree | 008692046b037c524d67ac6cf80749b4f7236b14 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 0904f5475ada2cdf2a4c8a79f2411b82b1b8e2f0 (diff) | |
| parent | 90a16e43972f8039e1f045752f04b4011a38b92f (diff) | |
| download | rust-9f9e9f7e52e46a029f4713b466a78268ff12c11f.tar.gz rust-9f9e9f7e52e46a029f4713b466a78268ff12c11f.zip | |
Auto merge of #6316 - ThibsG:WrongSelfConventionTraitDef, r=ebroto
Lint also in trait def for `wrong_self_convention` Extends `wrong_self_convention` to lint also in trait definition. By the way, I think the `wrong_pub_self_convention` [example](https://github.com/rust-lang/rust-clippy/blob/dd826b4626c00da53f76f00f02f03556803e9cdb/clippy_lints/src/methods/mod.rs#L197) is misleading. On [playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=32615ab3f6009e7e42cc3754be0ca17f), it fires `wrong_self_convention`, so the example (or the lint maybe?) needs to be reworked. The difference with `wrong_self_convention` [example](https://github.com/rust-lang/rust-clippy/blob/dd826b4626c00da53f76f00f02f03556803e9cdb/clippy_lints/src/methods/mod.rs#L172) is mainly the `pub` keyword on the method `as_str`, but the lint doesn't use the function visibility as condition to choose which lint to fire (in fact it uses the visibility of the impl item). fixes: #6307 changelog: Lint `wrong_self_convention` lint in trait def also
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
