blob: 5c37cac96860e88da6df7bcfe0034661f5b27ca9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// run-pass
pub fn increment(x: usize) -> usize {
x + 1
}
#[macro_export]
macro_rules! increment {
($x:expr) => ({
use $crate::increment;
increment($x)
})
}
fn main() {
assert_eq!(increment!(3), 4);
}
|