2 #![warn(clippy::wrong_self_convention)]
3 #![warn(clippy::wrong_pub_self_convention)]
20 pub fn as_i64(self) {}
21 pub fn into_i64(self) {}
22 pub fn is_i64(self) {}
23 pub fn to_i64(self) {}
24 pub fn from_i64(self) {}
25 // check whether the lint can be allowed at the function level
26 #[allow(clippy::wrong_self_convention)]
27 pub fn from_cake(self) {}
29 fn as_x<F: AsRef<Self>>(_: F) {}
30 fn as_y<F: AsRef<Foo>>(_: F) {}
46 pub fn as_i64(self) {}
47 pub fn into_i64(&self) {}
48 pub fn is_i64(self) {}
49 pub fn to_i64(self) {}
50 pub fn from_i64(self) {}
52 // test for false positives
58 fn to_mut(&mut self) {}
61 // Allow Box<Self>, Rc<Self>, Arc<Self> for methods that take conventionally take Self by value
62 #[allow(clippy::boxed_local)]
70 fn into_s1(self: Box<Self>) {}
71 fn into_s2(self: Rc<Self>) {}
72 fn into_s3(self: Arc<Self>) {}
74 fn into_t1(self: Box<T>) {}
75 fn into_t2(self: Rc<T>) {}
76 fn into_t3(self: Arc<T>) {}
80 // False positive for async (see #4037)
86 pub async fn into_bar(self) -> Bar {