about summary refs log tree commit diff
path: root/tests/ui/privacy/suggest-making-field-public.fixed
blob: 8a5686aa5e1f4dcc706e0db21fdd99378428db68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@ run-rustfix
pub mod a {
    pub struct A(pub String);
}

mod b {
    use crate::a::A;
    pub fn x() {
        A("".into()); //~ ERROR cannot initialize a tuple struct which contains private fields
    }
}
fn main() {
    a::A("a".into()); //~ ERROR tuple struct constructor `A` is private
    b::x();
}