blob: 2ab4e3955f336aad0a1a0363066066cafba0bcfa (
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.0); //~ ERROR mismatched types
some_fn(my_wrapper!(123).0); //~ ERROR mismatched types
}
fn some_fn(wrapped: MyWrapper) {
drop(wrapped);
}
|