]> git.lizzy.rs Git - rust.git/blob - tests/ui/macros/macro-use-scope.rs
Auto merge of #106976 - tmiasko:borrowck-lazy-dominators, r=cjgillot
[rust.git] / tests / ui / macros / macro-use-scope.rs
1 // aux-build:two_macros.rs
2
3 // build-pass (FIXME(62277): could be check-pass?)
4 #![allow(unused)]
5
6 fn f() {
7     let _ = macro_one!();
8 }
9 #[macro_use(macro_one)] // Check that this macro is usable in the above function
10 extern crate two_macros;
11
12 fn g() {
13     macro_two!();
14 }
15 macro_rules! m { () => {
16     #[macro_use(macro_two)] // Check that this macro is usable in the above function
17     extern crate two_macros as _two_macros;
18 } }
19 m!();
20
21
22 fn main() {}