]> git.lizzy.rs Git - rust.git/blob - src/test/ui/macros/issue-25274.rs
Auto merge of #83152 - guswynn:jemallocator_part2, r=Mark-Simulacrum
[rust.git] / src / test / ui / macros / issue-25274.rs
1 // run-pass
2
3 macro_rules! test {
4     (
5         fn fun() -> Option<Box<$t:ty>>;
6     ) => {
7         fn fun(x: $t) -> Option<Box<$t>>
8         { Some(Box::new(x)) }
9     }
10 }
11
12 test! {
13     fn fun() -> Option<Box<i32>>;
14 }
15
16 fn main() {
17     println!("{}", fun(0).unwrap());
18 }