mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
13 lines
195 B
Rust
13 lines
195 B
Rust
pub fn increment(x: usize) -> usize {
|
|
x + 1
|
|
}
|
|
|
|
#[macro_export]
|
|
macro_rules! increment {
|
|
($x:expr) => ($crate::increment($x))
|
|
}
|
|
|
|
pub fn check_local() {
|
|
assert_eq!(increment!(3), 4);
|
|
}
|