Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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``
- Loading branch information
1 parent
cb144c3
commit a5138b3
Showing
2 changed files
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#![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"), | ||
} | ||
}; | ||
} |