1 error[E0423]: expected value, found struct `Z`
2 --> $DIR/privacy-struct-ctor.rs:20:9
5 | ----------------- similarly named tuple struct `S` defined here
10 | constructor is not visible here due to private fields
11 | help: a tuple struct with a similar name exists: `S`
13 error[E0423]: expected value, found struct `S`
14 --> $DIR/privacy-struct-ctor.rs:33:5
17 | ^ constructor is not visible here due to private fields
19 error[E0423]: expected value, found struct `S2`
20 --> $DIR/privacy-struct-ctor.rs:38:5
22 LL | / pub struct S2 {
25 | |_____- `S2` defined here
28 | ^^ help: use struct literal syntax instead: `S2 { s: val }`
30 error[E0423]: expected value, found struct `xcrate::S`
31 --> $DIR/privacy-struct-ctor.rs:43:5
34 | ^^^^^^^^^ constructor is not visible here due to private fields
36 note: tuple struct `m::S` exists but is inaccessible
37 --> $DIR/privacy-struct-ctor.rs:6:5
39 LL | pub struct S(u8);
40 | ^^^^^^^^^^^^^^^^^ not accessible
42 error[E0603]: tuple struct constructor `Z` is private
43 --> $DIR/privacy-struct-ctor.rs:18:12
45 LL | pub(in m) struct Z(pub(in m::n) u8);
46 | --------------- a constructor is private if any of the fields is private
49 | ^ private tuple struct constructor
51 note: the tuple struct constructor `Z` is defined here
52 --> $DIR/privacy-struct-ctor.rs:12:9
54 LL | pub(in m) struct Z(pub(in m::n) u8);
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56 help: consider making the field publicly accessible
58 LL | pub(in m) struct Z(pub u8);
61 error[E0603]: tuple struct constructor `S` is private
62 --> $DIR/privacy-struct-ctor.rs:29:8
64 LL | pub struct S(u8);
65 | -- a constructor is private if any of the fields is private
68 | ^ private tuple struct constructor
70 note: the tuple struct constructor `S` is defined here
71 --> $DIR/privacy-struct-ctor.rs:6:5
73 LL | pub struct S(u8);
75 help: consider making the field publicly accessible
77 LL | pub struct S(pub u8);
80 error[E0603]: tuple struct constructor `S` is private
81 --> $DIR/privacy-struct-ctor.rs:31:19
83 LL | pub struct S(u8);
84 | -- a constructor is private if any of the fields is private
86 LL | let _: S = m::S(2);
87 | ^ private tuple struct constructor
89 note: the tuple struct constructor `S` is defined here
90 --> $DIR/privacy-struct-ctor.rs:6:5
92 LL | pub struct S(u8);
94 help: consider making the field publicly accessible
96 LL | pub struct S(pub u8);
99 error[E0603]: tuple struct constructor `Z` is private
100 --> $DIR/privacy-struct-ctor.rs:35:11
102 LL | pub(in m) struct Z(pub(in m::n) u8);
103 | --------------- a constructor is private if any of the fields is private
106 | ^ private tuple struct constructor
108 note: the tuple struct constructor `Z` is defined here
109 --> $DIR/privacy-struct-ctor.rs:12:9
111 LL | pub(in m) struct Z(pub(in m::n) u8);
112 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113 help: consider making the field publicly accessible
115 LL | pub(in m) struct Z(pub u8);
118 error[E0603]: tuple struct constructor `S` is private
119 --> $DIR/privacy-struct-ctor.rs:41:16
122 | ^ private tuple struct constructor
124 ::: $DIR/auxiliary/privacy-struct-ctor.rs:2:18
126 LL | pub struct S(u8);
127 | -- a constructor is private if any of the fields is private
129 note: the tuple struct constructor `S` is defined here
130 --> $DIR/auxiliary/privacy-struct-ctor.rs:2:5
132 LL | pub struct S(u8);
135 error[E0603]: tuple struct constructor `Z` is private
136 --> $DIR/privacy-struct-ctor.rs:45:19
138 LL | xcrate::m::n::Z;
139 | ^ private tuple struct constructor
141 ::: $DIR/auxiliary/privacy-struct-ctor.rs:5:28
143 LL | pub(in m) struct Z(pub(in m::n) u8);
144 | --------------- a constructor is private if any of the fields is private
146 note: the tuple struct constructor `Z` is defined here
147 --> $DIR/auxiliary/privacy-struct-ctor.rs:5:9
149 LL | pub(in m) struct Z(pub(in m::n) u8);
152 error: aborting due to 10 previous errors
154 Some errors have detailed explanations: E0423, E0603.
155 For more information about an error, try `rustc --explain E0423`.