about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/crashes/inherent_impl.rs
blob: 87f1347ecfca09634fd37ab3c790cf98cde6c4fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//@ check-pass

#![deny(clippy::multiple_inherent_impl)]

// Test for https://github.com/rust-lang/rust-clippy/issues/4578

macro_rules! impl_foo {
    ($struct:ident) => {
        impl $struct {
            fn foo() {}
        }
    };
}

macro_rules! impl_bar {
    ($struct:ident) => {
        impl $struct {
            fn bar() {}
        }
    };
}

struct MyStruct;

impl_foo!(MyStruct);
impl_bar!(MyStruct);

fn main() {}