We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8df418d commit 1b3282fCopy full SHA for 1b3282f
tests/ui/modules/module-super-access.rs
@@ -1,3 +1,6 @@
1
+//! Check that the `super` keyword correctly allows accessing items from the parent module.
2
+//! This test verifies basic module visibility and path resolution when using `super`.
3
+
4
//@ run-pass
5
6
#![allow(dead_code)]
@@ -6,10 +9,9 @@ pub mod a {
9
pub fn f() {}
7
10
pub mod b {
8
11
fn g() {
- super::f();
12
+ super::f(); // Accessing `f` from module `a` (parent of `b`)
13
}
14
15
16
-pub fn main() {
-}
17
+pub fn main() {}
0 commit comments