summaryrefslogtreecommitdiffstats
path: root/src/test/ui/mismatched_types/suggest-removing-tulpe-struct-field.fixed
blob: 63b65ab20fea8a961f920959e81f8597c5d6ab60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// run-rustfix

macro_rules! my_wrapper {
    ($expr:expr) => { MyWrapper($expr) }
}

pub struct MyWrapper(u32);

fn main() {
    let value = MyWrapper(123);
    some_fn(value); //~ ERROR mismatched types
    some_fn(my_wrapper!(123)); //~ ERROR mismatched types
}

fn some_fn(wrapped: MyWrapper) {
    drop(wrapped);
}