fork/rust
git clone https://git.julia.blue/fork/rust
b8cedc00407
1.42.0
1error[E0423]: expected function, tuple struct or tuple variant, found struct `TupleStruct` 2 --> $DIR/struct.rs:20:14 3 | 4LL | let ts = TupleStruct(640, 480); 5 | ^^^^^^^^^^^ constructor is not visible here due to private fields 6 7error[E0423]: expected value, found struct `UnitStruct` 8 --> $DIR/struct.rs:29:14 9 | 10LL | let us = UnitStruct; 11 | ^^^^^^^^^^ constructor is not visible here due to private fields 12 13error[E0603]: tuple struct constructor `TupleStruct` is private 14 --> $DIR/struct.rs:23:32 15 | 16LL | let ts_explicit = structs::TupleStruct(640, 480); 17 | ^^^^^^^^^^^ this tuple struct constructor is private 18 | 19 ::: $DIR/auxiliary/structs.rs:11:24 20 | 21LL | pub struct TupleStruct(pub u16, pub u16); 22 | ---------------- a constructor is private if any of the fields is private 23 | 24note: the tuple struct constructor `TupleStruct` is defined here 25 --> $DIR/auxiliary/structs.rs:11:1 26 | 27LL | pub struct TupleStruct(pub u16, pub u16); 28 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 29 30error[E0603]: unit struct `UnitStruct` is private 31 --> $DIR/struct.rs:32:32 32 | 33LL | let us_explicit = structs::UnitStruct; 34 | ^^^^^^^^^^ this unit struct is private 35 | 36note: the unit struct `UnitStruct` is defined here 37 --> $DIR/auxiliary/structs.rs:8:1 38 | 39LL | pub struct UnitStruct; 40 | ^^^^^^^^^^^^^^^^^^^^^^ 41 42error[E0639]: cannot create non-exhaustive struct using struct expression 43 --> $DIR/struct.rs:7:14 44 | 45LL | let fr = FunctionalRecord { 46 | ______________^ 47LL | | 48LL | | first_field: 1920, 49LL | | second_field: 1080, 50LL | | ..FunctionalRecord::default() 51LL | | }; 52 | |_____^ 53 54error[E0639]: cannot create non-exhaustive struct using struct expression 55 --> $DIR/struct.rs:14:14 56 | 57LL | let ns = NormalStruct { first_field: 640, second_field: 480 }; 58 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 59 60error[E0638]: `..` required with struct marked as non-exhaustive 61 --> $DIR/struct.rs:17:9 62 | 63LL | let NormalStruct { first_field, second_field } = ns; 64 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 65 66error[E0638]: `..` required with struct marked as non-exhaustive 67 --> $DIR/struct.rs:26:9 68 | 69LL | let TupleStruct { 0: first_field, 1: second_field } = ts; 70 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 71 72error[E0638]: `..` required with struct marked as non-exhaustive 73 --> $DIR/struct.rs:35:9 74 | 75LL | let UnitStruct { } = us; 76 | ^^^^^^^^^^^^^^ 77 78error: aborting due to 9 previous errors 79 80Some errors have detailed explanations: E0423, E0603, E0638, E0639. 81For more information about an error, try `rustc --explain E0423`.