]> git.lizzy.rs Git - rust.git/blob - tests/ui/crashes/inherent_impl.rs
Rollup merge of #5410 - dtolnay:trivially, r=flip1995
[rust.git] / tests / ui / crashes / inherent_impl.rs
1 #![deny(clippy::multiple_inherent_impl)]
2
3 /// Test for https://github.com/rust-lang/rust-clippy/issues/4578
4
5 macro_rules! impl_foo {
6     ($struct:ident) => {
7         impl $struct {
8             fn foo() {}
9         }
10     };
11 }
12
13 macro_rules! impl_bar {
14     ($struct:ident) => {
15         impl $struct {
16             fn bar() {}
17         }
18     };
19 }
20
21 struct MyStruct;
22
23 impl_foo!(MyStruct);
24 impl_bar!(MyStruct);
25
26 fn main() {}