2025-07-01 20:20:14 +05:00
|
|
|
//! Check path resolution using `super`
|
|
|
|
|
|
2019-07-27 00:54:25 +03:00
|
|
|
//@ run-pass
|
|
|
|
|
|
2018-09-14 12:20:28 +02:00
|
|
|
#![allow(dead_code)]
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2012-12-23 17:41:37 -05:00
|
|
|
pub mod a {
|
|
|
|
|
pub fn f() {}
|
|
|
|
|
pub mod b {
|
|
|
|
|
fn g() {
|
2025-07-01 20:20:14 +05:00
|
|
|
super::f(); // Accessing `f` from module `a` (parent of `b`)
|
2012-12-23 17:41:37 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-07-01 20:20:14 +05:00
|
|
|
pub fn main() {}
|