rust/src/test/ui/privacy/issue-29161.rs
2021-01-16 19:46:54 -03:00

16 lines
230 B
Rust

mod a {
struct A;
impl Default for A {
pub fn default() -> A { //~ ERROR unnecessary visibility qualifier
A
}
}
}
fn main() {
a::A::default();
//~^ ERROR struct `A` is private
}