mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 05:03:21 +00:00
Fix false positive for wrong_self_convention
This commit is contained in:
parent
49c2c2c628
commit
3a0d342a33
2 changed files with 7 additions and 1 deletions
|
@ -1256,7 +1256,7 @@ impl Convention {
|
|||
fn check(&self, other: &str) -> bool {
|
||||
match *self {
|
||||
Convention::Eq(this) => this == other,
|
||||
Convention::StartsWith(this) => other.starts_with(this),
|
||||
Convention::StartsWith(this) => other.starts_with(this) && this != other,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,4 +45,10 @@ impl Bar {
|
|||
pub fn to_i64(self) {} //~ERROR: methods called `to_*` usually take self by reference
|
||||
pub fn from_i64(self) {} //~ERROR: methods called `from_*` usually take no self
|
||||
|
||||
// test for false positives
|
||||
fn as_(self) {}
|
||||
fn into_(&self) {}
|
||||
fn is_(self) {}
|
||||
fn to_(self) {}
|
||||
fn from_(self) {}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue