fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0423]: expected value, found struct `Z` 2 --> $DIR/privacy-struct-ctor.rs:20:9 3 | 4LL | pub struct S(u8); 5 | ----------------- similarly named tuple struct `S` defined here 6... 7LL | Z; 8 | ^ 9 | | 10 | constructor is not visible here due to private fields 11 | help: a tuple struct with a similar name exists: `S` 12 13error[E0423]: expected value, found struct `S` 14 --> $DIR/privacy-struct-ctor.rs:33:5 15 | 16LL | S; 17 | ^ constructor is not visible here due to private fields 18 19error[E0423]: expected value, found struct `S2` 20 --> $DIR/privacy-struct-ctor.rs:38:5 21 | 22LL | / pub struct S2 { 23LL | | s: u8 24LL | | } 25 | |_____- `S2` defined here 26... 27LL | S2; 28 | ^^ help: use struct literal syntax instead: `S2 { s: val }` 29 30error[E0423]: expected value, found struct `xcrate::S` 31 --> $DIR/privacy-struct-ctor.rs:43:5 32 | 33LL | xcrate::S; 34 | ^^^^^^^^^ constructor is not visible here due to private fields 35 | 36note: tuple struct `m::S` exists but is inaccessible 37 --> $DIR/privacy-struct-ctor.rs:6:5 38 | 39LL | pub struct S(u8); 40 | ^^^^^^^^^^^^^^^^^ not accessible 41 42error[E0603]: tuple struct constructor `Z` is private 43 --> $DIR/privacy-struct-ctor.rs:18:12 44 | 45LL | pub(in m) struct Z(pub(in m::n) u8); 46 | --------------- a constructor is private if any of the fields is private 47... 48LL | n::Z; 49 | ^ private tuple struct constructor 50 | 51note: the tuple struct constructor `Z` is defined here 52 --> $DIR/privacy-struct-ctor.rs:12:9 53 | 54LL | pub(in m) struct Z(pub(in m::n) u8); 55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 56help: consider making the field publicly accessible 57 | 58LL | pub(in m) struct Z(pub u8); 59 | ~~~ 60 61error[E0603]: tuple struct constructor `S` is private 62 --> $DIR/privacy-struct-ctor.rs:29:8 63 | 64LL | pub struct S(u8); 65 | -- a constructor is private if any of the fields is private 66... 67LL | m::S; 68 | ^ private tuple struct constructor 69 | 70note: the tuple struct constructor `S` is defined here 71 --> $DIR/privacy-struct-ctor.rs:6:5 72 | 73LL | pub struct S(u8); 74 | ^^^^^^^^^^^^^^^^^ 75help: consider making the field publicly accessible 76 | 77LL | pub struct S(pub u8); 78 | +++ 79 80error[E0603]: tuple struct constructor `S` is private 81 --> $DIR/privacy-struct-ctor.rs:31:19 82 | 83LL | pub struct S(u8); 84 | -- a constructor is private if any of the fields is private 85... 86LL | let _: S = m::S(2); 87 | ^ private tuple struct constructor 88 | 89note: the tuple struct constructor `S` is defined here 90 --> $DIR/privacy-struct-ctor.rs:6:5 91 | 92LL | pub struct S(u8); 93 | ^^^^^^^^^^^^^^^^^ 94help: consider making the field publicly accessible 95 | 96LL | pub struct S(pub u8); 97 | +++ 98 99error[E0603]: tuple struct constructor `Z` is private 100 --> $DIR/privacy-struct-ctor.rs:35:11 101 | 102LL | pub(in m) struct Z(pub(in m::n) u8); 103 | --------------- a constructor is private if any of the fields is private 104... 105LL | m::n::Z; 106 | ^ private tuple struct constructor 107 | 108note: the tuple struct constructor `Z` is defined here 109 --> $DIR/privacy-struct-ctor.rs:12:9 110 | 111LL | pub(in m) struct Z(pub(in m::n) u8); 112 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 113help: consider making the field publicly accessible 114 | 115LL | pub(in m) struct Z(pub u8); 116 | ~~~ 117 118error[E0603]: tuple struct constructor `S` is private 119 --> $DIR/privacy-struct-ctor.rs:41:16 120 | 121LL | xcrate::m::S; 122 | ^ private tuple struct constructor 123 | 124 ::: $DIR/auxiliary/privacy-struct-ctor.rs:2:18 125 | 126LL | pub struct S(u8); 127 | -- a constructor is private if any of the fields is private 128 | 129note: the tuple struct constructor `S` is defined here 130 --> $DIR/auxiliary/privacy-struct-ctor.rs:2:5 131 | 132LL | pub struct S(u8); 133 | ^^^^^^^^^^^^ 134 135error[E0603]: tuple struct constructor `Z` is private 136 --> $DIR/privacy-struct-ctor.rs:45:19 137 | 138LL | xcrate::m::n::Z; 139 | ^ private tuple struct constructor 140 | 141 ::: $DIR/auxiliary/privacy-struct-ctor.rs:5:28 142 | 143LL | pub(in m) struct Z(pub(in m::n) u8); 144 | --------------- a constructor is private if any of the fields is private 145 | 146note: the tuple struct constructor `Z` is defined here 147 --> $DIR/auxiliary/privacy-struct-ctor.rs:5:9 148 | 149LL | pub(in m) struct Z(pub(in m::n) u8); 150 | ^^^^^^^^^^^^^^^^^^ 151 152error: aborting due to 10 previous errors 153 154Some errors have detailed explanations: E0423, E0603. 155For more information about an error, try `rustc --explain E0423`.