]> git.lizzy.rs Git - rust.git/blob - tests/ui/privacy/suggest-making-field-public.fixed
Rollup merge of #106661 - mjguzik:linux_statx, r=Mark-Simulacrum
[rust.git] / tests / ui / privacy / suggest-making-field-public.fixed
1 // run-rustfix
2 mod a {
3     pub struct A(pub String);
4 }
5
6 mod b {
7     use crate::a::A;
8     pub fn x() {
9         A("".into()); //~ ERROR cannot initialize a tuple struct which contains private fields
10     }
11 }
12 fn main() {
13     a::A("a".into()); //~ ERROR tuple struct constructor `A` is private
14     b::x();
15 }