-
Notifications
You must be signed in to change notification settings - Fork 933
Closed
Labels
2x-port:pendinga-macrosgood first issueIssues up for grabs, also good candidates for new rustfmt contributorsIssues up for grabs, also good candidates for new rustfmt contributorshelp wanted
Description
Pretty niche use case, but running rustfmt
makes the code no longer compile.
#![feature(more_qualified_paths)]
macro_rules! show {
($ty:ty, $ex:expr) => {
match $ex {
<$ty>::A(_val) => println!("got a"), // formatting removes <$ty>::
<$ty>::B => println!("got b"),
}
};
}
#[derive(Debug)]
pub enum Enum1 {
A(u8),
B,
}
fn main() {
show!(Enum1, Enum1::B);
}
$ rustfmt --version
rustfmt 1.4.37-nightly (addb4da 2021-09-25)
Metadata
Metadata
Assignees
Labels
2x-port:pendinga-macrosgood first issueIssues up for grabs, also good candidates for new rustfmt contributorsIssues up for grabs, also good candidates for new rustfmt contributorshelp wanted