]> git.lizzy.rs Git - rust.git/blob - tests/ui/impl.rs
Auto merge of #68717 - petrochenkov:stabexpat, r=varkor
[rust.git] / tests / ui / impl.rs
1 #![allow(dead_code)]
2 #![warn(clippy::multiple_inherent_impl)]
3
4 struct MyStruct;
5
6 impl MyStruct {
7     fn first() {}
8 }
9
10 impl MyStruct {
11     fn second() {}
12 }
13
14 impl<'a> MyStruct {
15     fn lifetimed() {}
16 }
17
18 mod submod {
19     struct MyStruct;
20     impl MyStruct {
21         fn other() {}
22     }
23
24     impl super::MyStruct {
25         fn third() {}
26     }
27 }
28
29 use std::fmt;
30 impl fmt::Debug for MyStruct {
31     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
32         write!(f, "MyStruct {{ }}")
33     }
34 }
35
36 fn main() {}