]> git.lizzy.rs Git - rust.git/blob - tests/ui/macros/macro-crate-use.rs
Rollup merge of #106970 - kylematsuda:earlybinder-item-bounds, r=lcnr
[rust.git] / tests / ui / macros / macro-crate-use.rs
1 // run-pass
2
3 pub fn increment(x: usize) -> usize {
4     x + 1
5 }
6
7 #[macro_export]
8 macro_rules! increment {
9     ($x:expr) => ({
10         use $crate::increment;
11         increment($x)
12     })
13 }
14
15 fn main() {
16     assert_eq!(increment!(3), 4);
17 }