]> git.lizzy.rs Git - rust.git/blob - tests/ui/needless_arbitrary_self_type.rs
adopt comments from review
[rust.git] / tests / ui / needless_arbitrary_self_type.rs
1 #![warn(clippy::needless_arbitrary_self_type)]
2
3 pub enum ValType {
4     A,
5     B,
6 }
7
8 impl ValType {
9     pub fn bad(self: Self) {
10         unimplemented!();
11     }
12
13     pub fn good(self) {
14         unimplemented!();
15     }
16
17     pub fn mut_bad(mut self: Self) {
18         unimplemented!();
19     }
20
21     pub fn mut_good(mut self) {
22         unimplemented!();
23     }
24
25     pub fn ref_bad(self: &Self) {
26         unimplemented!();
27     }
28
29     pub fn ref_bad_with_lifetime<'a>(self: &'a Self) {
30         unimplemented!();
31     }
32
33     pub fn ref_good(&self) {
34         unimplemented!();
35     }
36
37     pub fn mut_ref_bad(self: &mut Self) {
38         unimplemented!();
39     }
40
41     pub fn mut_ref_bad_with_lifetime<'a>(self: &'a mut Self) {
42         unimplemented!();
43     }
44
45     pub fn mut_ref_good(&mut self) {
46         unimplemented!();
47     }
48
49     pub fn mut_ref_mut_bad(mut self: &mut Self) {
50         unimplemented!();
51     }
52
53     pub fn mut_ref_mut_ref_good(self: &&mut &mut Self) {
54         unimplemented!();
55     }
56 }
57
58 fn main() {}