about summary refs log tree commit diff
path: root/tests/ui/modules/module-super-access.rs
blob: 8acba607f6c06b794a97b6cc32cca59a5e2c6a5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Check path resolution using `super`

//@ run-pass

#![allow(dead_code)]

pub mod a {
    pub fn f() {}
    pub mod b {
        fn g() {
            super::f(); // Accessing `f` from module `a` (parent of `b`)
        }
    }
}

pub fn main() {}