]> git.proxmox.com Git - rustc.git/blame - tests/ui/macros/issue-98790.rs
Update upstream source from tag 'upstream/1.70.0+dfsg1'
[rustc.git] / tests / ui / macros / issue-98790.rs
CommitLineData
353b0b11
FG
1// run-pass
2
3macro_rules! stringify_item {
4 ($item:item) => {
5 stringify!($item)
6 };
7}
8
9macro_rules! repro {
10 ($expr:expr) => {
11 stringify_item! {
12 pub fn repro() -> bool {
13 $expr
14 }
15 }
16 };
17}
18
19fn main() {
20 assert_eq!(
21 repro!(match () { () => true } | true),
22 "pub fn repro() -> bool { (match () { () => true, }) | true }"
23 );
24}