mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-03 01:25:15 +00:00
19 lines
413 B
Rust
19 lines
413 B
Rust
//! Regression test for <https://github.com/rust-lang/rust/issues/18859>.
|
|
|
|
//@ run-pass
|
|
|
|
mod foo {
|
|
pub mod bar {
|
|
pub mod baz {
|
|
pub fn name() -> &'static str {
|
|
module_path!()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
assert_eq!(module_path!(), "module_path_in_nested_modules");
|
|
assert_eq!(foo::bar::baz::name(), "module_path_in_nested_modules::foo::bar::baz");
|
|
}
|