rust/tests/ui/macros/macro-use-scope.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
452 B
Rust
Raw Normal View History

2016-06-12 04:24:51 +00:00
//@ aux-build:two_macros.rs
//@ build-pass (FIXME(62277): could be check-pass?)
2016-06-12 04:24:51 +00:00
#![allow(unused)]
fn f() {
let _ = macro_one!();
2016-06-02 02:24:49 +00:00
}
2016-06-12 04:24:51 +00:00
#[macro_use(macro_one)] // Check that this macro is usable in the above function
extern crate two_macros;
2016-10-11 05:13:40 +00:00
fn g() {
macro_two!();
}
2016-06-12 04:24:51 +00:00
macro_rules! m { () => {
#[macro_use(macro_two)] // Check that this macro is usable in the above function
extern crate two_macros as _two_macros;
} }
2016-06-02 02:24:49 +00:00
m!();
fn main() {}