fork/rust
git clone https://git.julia.blue/fork/rust
73528e339aa
1.40.0
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 | ^^ did you mean `S2 { /* fields */ }`? 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 | 36help: possible better candidate is found in another module, you can import it into scope 37 | 38LL | use m::S; 39 | 40 41error[E0603]: tuple struct constructor `Z` is private 42 --> $DIR/privacy-struct-ctor.rs:18:12 43 | 44LL | pub(in m) struct Z(pub(in m::n) u8); 45 | --------------- a constructor is private if any of the fields is private 46... 47LL | n::Z; 48 | ^ 49 50error[E0603]: tuple struct constructor `S` is private 51 --> $DIR/privacy-struct-ctor.rs:29:8 52 | 53LL | pub struct S(u8); 54 | -- a constructor is private if any of the fields is private 55... 56LL | m::S; 57 | ^ 58 59error[E0603]: tuple struct constructor `S` is private 60 --> $DIR/privacy-struct-ctor.rs:31:19 61 | 62LL | pub struct S(u8); 63 | -- a constructor is private if any of the fields is private 64... 65LL | let _: S = m::S(2); 66 | ^ 67 68error[E0603]: tuple struct constructor `Z` is private 69 --> $DIR/privacy-struct-ctor.rs:35:11 70 | 71LL | pub(in m) struct Z(pub(in m::n) u8); 72 | --------------- a constructor is private if any of the fields is private 73... 74LL | m::n::Z; 75 | ^ 76 77error[E0603]: tuple struct constructor `S` is private 78 --> $DIR/privacy-struct-ctor.rs:41:16 79 | 80LL | xcrate::m::S; 81 | ^ 82 | 83 ::: $DIR/auxiliary/privacy-struct-ctor.rs:2:18 84 | 85LL | pub struct S(u8); 86 | -- a constructor is private if any of the fields is private 87 88error[E0603]: tuple struct constructor `Z` is private 89 --> $DIR/privacy-struct-ctor.rs:45:19 90 | 91LL | xcrate::m::n::Z; 92 | ^ 93 | 94 ::: $DIR/auxiliary/privacy-struct-ctor.rs:5:28 95 | 96LL | pub(in m) struct Z(pub(in m::n) u8); 97 | --------------- a constructor is private if any of the fields is private 98 99error: aborting due to 10 previous errors 100 101Some errors have detailed explanations: E0423, E0603. 102For more information about an error, try `rustc --explain E0423`.