rust/tests/ui/privacy/pub-restricted-path-usage-55376.rs
2025-08-27 15:06:05 -04:00

18 lines
344 B
Rust

// 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() {}