Fix false positive for wrong_self_convention
This commit is contained in:
parent
49c2c2c628
commit
3a0d342a33
@ -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…
x
Reference in New Issue
Block a user