Skip to content

Commit 1b3282f

Browse files
committed
super
1 parent 8df418d commit 1b3282f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
14
//@ run-pass
25

36
#![allow(dead_code)]
@@ -6,10 +9,9 @@ pub mod a {
69
pub fn f() {}
710
pub mod b {
811
fn g() {
9-
super::f();
12+
super::f(); // Accessing `f` from module `a` (parent of `b`)
1013
}
1114
}
1215
}
1316

14-
pub fn main() {
15-
}
17+
pub fn main() {}

0 commit comments

Comments
 (0)