aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/pub_restricted_3.rs
blob: d477385d761fb8093aa32685c489d6e42f8920bf (plain)
1
2
3
4
5
6
7
8
9
10
11
// { dg-additional-options "-w" }

mod foo {
    mod bar {
        pub(in foo) fn baz() {}
    }

    fn baz() {
        bar::baz(); // no error, foo::bar::baz is public in foo
    }
}