2 #![warn(clippy::wrong_self_convention)]
19 pub fn as_i64(self) {}
20 pub fn into_i64(self) {}
21 pub fn is_i64(self) {}
22 pub fn to_i64(self) {}
23 pub fn from_i64(self) {}
24 // check whether the lint can be allowed at the function level
25 #[allow(clippy::wrong_self_convention)]
26 pub fn from_cake(self) {}
28 fn as_x<F: AsRef<Self>>(_: F) {}
29 fn as_y<F: AsRef<Foo>>(_: F) {}
45 pub fn as_i64(self) {}
46 pub fn into_i64(&self) {}
47 pub fn is_i64(self) {}
48 pub fn to_i64(self) {}
49 pub fn from_i64(self) {}
51 // test for false positives
57 fn to_mut(&mut self) {}
60 // Allow Box<Self>, Rc<Self>, Arc<Self> for methods that take conventionally take Self by value
61 #[allow(clippy::boxed_local)]
69 fn into_s1(self: Box<Self>) {}
70 fn into_s2(self: Rc<Self>) {}
71 fn into_s3(self: Arc<Self>) {}
73 fn into_t1(self: Box<T>) {}
74 fn into_t2(self: Rc<T>) {}
75 fn into_t3(self: Arc<T>) {}
79 // False positive for async (see #4037)
85 pub async fn into_bar(self) -> Bar {
91 // Lint also in trait definition (see #6307)
97 fn into_i32_ref(&self) {}
104 // check whether the lint can be allowed at the function level
105 #[allow(clippy::wrong_self_convention)]
106 fn from_cake(self) {}
108 // test for false positives
114 fn to_mut(&mut self) {}
121 fn into_i32_ref(&self);
128 // check whether the lint can be allowed at the function level
129 #[allow(clippy::wrong_self_convention)]
132 // test for false positives
138 fn to_mut(&mut self);
145 fn into_i32_ref(&self);
152 // check whether the lint can be allowed at the function level
153 #[allow(clippy::wrong_self_convention)]
156 // test for false positives
162 fn to_mut(&mut self);
167 #[derive(Clone, Copy)]
171 fn to_u64(self) -> u64 {
175 fn to_u64_v2(&self) -> u64 {
184 fn to_u64(self) -> u64 {
187 fn to_u64_v2(&self) -> u64 {