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 help: consider importing this tuple struct instead
41 error[E0603]: tuple struct constructor `Z` is private
42 --> $DIR/privacy-struct-ctor.rs:18:12
44 LL | pub(in m) struct Z(pub(in m::n) u8);
45 | --------------- a constructor is private if any of the fields is private
48 | ^ private tuple struct constructor
50 note: the tuple struct constructor `Z` is defined here
51 --> $DIR/privacy-struct-ctor.rs:12:9
53 LL | pub(in m) struct Z(pub(in m::n) u8);
54 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56 error[E0603]: tuple struct constructor `S` is private
57 --> $DIR/privacy-struct-ctor.rs:29:8
59 LL | pub struct S(u8);
60 | -- a constructor is private if any of the fields is private
63 | ^ private tuple struct constructor
65 note: the tuple struct constructor `S` is defined here
66 --> $DIR/privacy-struct-ctor.rs:6:5
68 LL | pub struct S(u8);
71 error[E0603]: tuple struct constructor `S` is private
72 --> $DIR/privacy-struct-ctor.rs:31:19
74 LL | pub struct S(u8);
75 | -- a constructor is private if any of the fields is private
77 LL | let _: S = m::S(2);
78 | ^ private tuple struct constructor
80 note: the tuple struct constructor `S` is defined here
81 --> $DIR/privacy-struct-ctor.rs:6:5
83 LL | pub struct S(u8);
86 error[E0603]: tuple struct constructor `Z` is private
87 --> $DIR/privacy-struct-ctor.rs:35:11
89 LL | pub(in m) struct Z(pub(in m::n) u8);
90 | --------------- a constructor is private if any of the fields is private
93 | ^ private tuple struct constructor
95 note: the tuple struct constructor `Z` is defined here
96 --> $DIR/privacy-struct-ctor.rs:12:9
98 LL | pub(in m) struct Z(pub(in m::n) u8);
99 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
101 error[E0603]: tuple struct constructor `S` is private
102 --> $DIR/privacy-struct-ctor.rs:41:16
105 | ^ private tuple struct constructor
107 ::: $DIR/auxiliary/privacy-struct-ctor.rs:2:18
109 LL | pub struct S(u8);
110 | -- a constructor is private if any of the fields is private
112 note: the tuple struct constructor `S` is defined here
113 --> $DIR/auxiliary/privacy-struct-ctor.rs:2:5
115 LL | pub struct S(u8);
118 error[E0603]: tuple struct constructor `Z` is private
119 --> $DIR/privacy-struct-ctor.rs:45:19
121 LL | xcrate::m::n::Z;
122 | ^ private tuple struct constructor
124 ::: $DIR/auxiliary/privacy-struct-ctor.rs:5:28
126 LL | pub(in m) struct Z(pub(in m::n) u8);
127 | --------------- a constructor is private if any of the fields is private
129 note: the tuple struct constructor `Z` is defined here
130 --> $DIR/auxiliary/privacy-struct-ctor.rs:5:9
132 LL | pub(in m) struct Z(pub(in m::n) u8);
133 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
135 error: aborting due to 10 previous errors
137 Some errors have detailed explanations: E0423, E0603.
138 For more information about an error, try `rustc --explain E0423`.