error[E0423]: expected function, found struct `TupleStruct` --> $DIR/structs.rs:30:14 | LL | let ts = TupleStruct(640, 480); | ^^^^^^^^^^^ constructor is not visible here due to private fields error[E0423]: expected value, found struct `UnitStruct` --> $DIR/structs.rs:39:14 | LL | let us = UnitStruct; | ^^^^^^^^^^ constructor is not visible here due to private fields error[E0603]: tuple struct `TupleStruct` is private --> $DIR/structs.rs:33:23 | LL | let ts_explicit = structs::TupleStruct(640, 480); | ^^^^^^^^^^^^^^^^^^^^ error[E0603]: unit struct `UnitStruct` is private --> $DIR/structs.rs:42:23 | LL | let us_explicit = structs::UnitStruct; | ^^^^^^^^^^^^^^^^^^^ error[E0639]: cannot create non-exhaustive struct using struct expression --> $DIR/structs.rs:17:14 | LL | let fr = FunctionalRecord { | ______________^ LL | | //~^ ERROR cannot create non-exhaustive struct LL | | first_field: 1920, LL | | second_field: 1080, LL | | ..FunctionalRecord::default() LL | | }; | |_____^ error[E0639]: cannot create non-exhaustive struct using struct expression --> $DIR/structs.rs:24:14 | LL | let ns = NormalStruct { first_field: 640, second_field: 480 }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0638]: `..` required with struct marked as non-exhaustive --> $DIR/structs.rs:27:9 | LL | let NormalStruct { first_field, second_field } = ns; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0638]: `..` required with struct marked as non-exhaustive --> $DIR/structs.rs:36:9 | LL | let TupleStruct { 0: first_field, 1: second_field } = ts; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0638]: `..` required with struct marked as non-exhaustive --> $DIR/structs.rs:45:9 | LL | let UnitStruct { } = us; | ^^^^^^^^^^^^^^ error: aborting due to 9 previous errors Some errors occurred: E0423, E0603, E0638, E0639. For more information about an error, try `rustc --explain E0423`.