1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
// run-pass mod foo { pub mod bar { pub mod baz { pub fn name() -> &'static str { module_path!() } } } } fn main() { assert_eq!(module_path!(), "issue_18859"); assert_eq!(foo::bar::baz::name(), "issue_18859::foo::bar::baz"); }