Debian Codegraph @

gcc/testsuite/rust/compile/pub_restricted_2.rs

raw
1 // { dg-additional-options "-w" }
2
3 mod foo {
4 mod bar {
5 mod baz {
6 pub(in baz) struct A0;
7 pub(in bar::baz) struct A1;
8 pub(in foo::bar::baz) struct A2;
9
10 mod sain {
11 mod doux {}
12 }
13
14 pub(in sain) struct A3; // { dg-error "restricted path is not an ancestor of the current module" }
15 pub(in sain::doux) struct A4; // { dg-error "restricted path is not an ancestor of the current module" }
16 }
17 }
18 }