mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-16 17:03:35 +00:00
Add UI test
This commit is contained in:
parent
cdeb0e3e02
commit
219195fc4c
24
tests/ui/macros/issue-98790.rs
Normal file
24
tests/ui/macros/issue-98790.rs
Normal file
@ -0,0 +1,24 @@
|
||||
// run-pass
|
||||
|
||||
macro_rules! stringify_item {
|
||||
($item:item) => {
|
||||
stringify!($item)
|
||||
};
|
||||
}
|
||||
|
||||
macro_rules! repro {
|
||||
($expr:expr) => {
|
||||
stringify_item! {
|
||||
pub fn repro() -> bool {
|
||||
$expr
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
fn main() {
|
||||
assert_eq!(
|
||||
repro!(match () { () => true } | true),
|
||||
"pub fn repro() -> bool { (match () { () => true, }) | true }"
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue
Block a user