diff options
Diffstat (limited to 'tests/ui/privacy/pub-restricted-path-usage-55376.rs')
| -rw-r--r-- | tests/ui/privacy/pub-restricted-path-usage-55376.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/privacy/pub-restricted-path-usage-55376.rs b/tests/ui/privacy/pub-restricted-path-usage-55376.rs new file mode 100644 index 00000000000..ca4e27c30a8 --- /dev/null +++ b/tests/ui/privacy/pub-restricted-path-usage-55376.rs @@ -0,0 +1,17 @@ +// https://github.com/rust-lang/rust/issues/55376 +//@ run-pass +// Tests that paths in `pub(...)` don't fail HIR verification. + +#![allow(unused_imports)] +#![allow(dead_code)] + +pub(self) use self::my_mod::Foo; + +mod my_mod { + pub(super) use self::Foo as Bar; + pub(in super::my_mod) use self::Foo as Baz; + + pub struct Foo; +} + +fn main() {} |
