rust/tests/ui/modules/mod_dir_path.rs

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

23 lines
362 B
Rust
Raw Normal View History

// run-pass
#![allow(unused_macros)]
mod mod_dir_simple {
#[path = "test.rs"]
pub mod syrup;
}
pub fn main() {
assert_eq!(mod_dir_simple::syrup::foo(), 10);
2016-09-27 21:31:30 +00:00
#[path = "auxiliary"]
mod foo {
2018-04-21 14:18:38 +00:00
mod two_macros_2;
2016-09-27 21:31:30 +00:00
}
#[path = "auxiliary"]
mod bar {
2018-04-21 14:18:38 +00:00
macro_rules! m { () => { mod two_macros_2; } }
2016-09-27 21:31:30 +00:00
m!();
}
}