]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/suggest-removing-tuple-struct-field.rs
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
[rust.git] / tests / ui / mismatched_types / suggest-removing-tuple-struct-field.rs
1 // run-rustfix
2
3 macro_rules! my_wrapper {
4     ($expr:expr) => { MyWrapper($expr) }
5 }
6
7 pub struct MyWrapper(u32);
8
9 fn main() {
10     let value = MyWrapper(123);
11     some_fn(value.0); //~ ERROR mismatched types
12     some_fn(my_wrapper!(123).0); //~ ERROR mismatched types
13 }
14
15 fn some_fn(wrapped: MyWrapper) {
16     drop(wrapped);
17 }