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 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
57 error[E0603]: tuple struct constructor `S` is private
58 --> $DIR/privacy-struct-ctor.rs:29:8
60 LL | pub struct S(u8);
61 | -- a constructor is private if any of the fields is private
64 | ^ private tuple struct constructor
66 note: the tuple struct constructor `S` is defined here
67 --> $DIR/privacy-struct-ctor.rs:6:5
69 LL | pub struct S(u8);
72 error[E0603]: tuple struct constructor `S` is private
73 --> $DIR/privacy-struct-ctor.rs:31:19
75 LL | pub struct S(u8);
76 | -- a constructor is private if any of the fields is private
78 LL | let _: S = m::S(2);
79 | ^ private tuple struct constructor
81 note: the tuple struct constructor `S` is defined here
82 --> $DIR/privacy-struct-ctor.rs:6:5
84 LL | pub struct S(u8);
87 error[E0603]: tuple struct constructor `Z` is private
88 --> $DIR/privacy-struct-ctor.rs:35:11
90 LL | pub(in m) struct Z(pub(in m::n) u8);
91 | --------------- a constructor is private if any of the fields is private
94 | ^ private tuple struct constructor
96 note: the tuple struct constructor `Z` is defined here
97 --> $DIR/privacy-struct-ctor.rs:12:9
99 LL | pub(in m) struct Z(pub(in m::n) u8);
100 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102 error[E0603]: tuple struct constructor `S` is private
103 --> $DIR/privacy-struct-ctor.rs:41:16
106 | ^ private tuple struct constructor
108 ::: $DIR/auxiliary/privacy-struct-ctor.rs:2:18
110 LL | pub struct S(u8);
111 | -- a constructor is private if any of the fields is private
113 note: the tuple struct constructor `S` is defined here
114 --> $DIR/auxiliary/privacy-struct-ctor.rs:2:5
116 LL | pub struct S(u8);
119 error[E0603]: tuple struct constructor `Z` is private
120 --> $DIR/privacy-struct-ctor.rs:45:19
122 LL | xcrate::m::n::Z;
123 | ^ private tuple struct constructor
125 ::: $DIR/auxiliary/privacy-struct-ctor.rs:5:28
127 LL | pub(in m) struct Z(pub(in m::n) u8);
128 | --------------- a constructor is private if any of the fields is private
130 note: the tuple struct constructor `Z` is defined here
131 --> $DIR/auxiliary/privacy-struct-ctor.rs:5:9
133 LL | pub(in m) struct Z(pub(in m::n) u8);
134 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136 error: aborting due to 10 previous errors
138 Some errors have detailed explanations: E0423, E0603.
139 For more information about an error, try `rustc --explain E0423`.