rust/tests/target/issue-5005/minimum_example.rs
Yacin Tmimi a5138b34d5 Prevent removal of qualified path for tuple struct inside macro
fixes 5005

This was very similar to 4964 and the fix was to extract and pass along
the qself of the ``PatKind::TupleStruct``
2021-09-27 17:49:10 -05:00

10 lines
253 B
Rust

#![feature(more_qualified_paths)]
macro_rules! show {
($ty:ty, $ex:expr) => {
match $ex {
<$ty>::A(_val) => println!("got a"), // formatting should not remove <$ty>::
<$ty>::B => println!("got b"),
}
};
}