]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/should_impl_trait/method_list_1.rs
Rollup merge of #78769 - est31:remove_lifetimes, r=KodrAus
[rust.git] / src / tools / clippy / tests / ui / should_impl_trait / method_list_1.rs
1 // edition:2018
2
3 #![warn(clippy::all, clippy::pedantic)]
4 #![allow(
5     clippy::missing_errors_doc,
6     clippy::needless_pass_by_value,
7     clippy::must_use_candidate,
8     clippy::unused_self,
9     clippy::needless_lifetimes,
10     clippy::missing_safety_doc,
11     clippy::wrong_self_convention
12 )]
13
14 use std::ops::Mul;
15 use std::rc::{self, Rc};
16 use std::sync::{self, Arc};
17
18 fn main() {}
19 pub struct T;
20
21 impl T {
22     // *****************************************
23     // trait method list part 1, should lint all
24     // *****************************************
25     pub fn add(self, other: T) -> T {
26         unimplemented!()
27     }
28
29     pub fn as_mut(&mut self) -> &mut T {
30         unimplemented!()
31     }
32
33     pub fn as_ref(&self) -> &T {
34         unimplemented!()
35     }
36
37     pub fn bitand(self, rhs: T) -> T {
38         unimplemented!()
39     }
40
41     pub fn bitor(self, rhs: Self) -> Self {
42         unimplemented!()
43     }
44
45     pub fn bitxor(self, rhs: Self) -> Self {
46         unimplemented!()
47     }
48
49     pub fn borrow(&self) -> &str {
50         unimplemented!()
51     }
52
53     pub fn borrow_mut(&mut self) -> &mut str {
54         unimplemented!()
55     }
56
57     pub fn clone(&self) -> Self {
58         unimplemented!()
59     }
60
61     pub fn cmp(&self, other: &Self) -> Self {
62         unimplemented!()
63     }
64
65     pub fn default() -> Self {
66         unimplemented!()
67     }
68
69     pub fn deref(&self) -> &Self {
70         unimplemented!()
71     }
72
73     pub fn deref_mut(&mut self) -> &mut Self {
74         unimplemented!()
75     }
76
77     pub fn div(self, rhs: Self) -> Self {
78         unimplemented!()
79     }
80
81     pub fn drop(&mut self) {
82         unimplemented!()
83     }
84     // **********
85     // part 1 end
86     // **********
87 }