When trying to create an inaccessible ADT due to private fields, handle
the case when no fields were passed.
```
error: cannot construct `Foo` with struct literal syntax due to private fields
--> $DIR/issue-76077.rs:8:5
|
LL | foo::Foo {};
| ^^^^^^^^
|
= note: private field `you_cant_use_this_field` that was not provided
```
10 lines
274 B
Text
10 lines
274 B
Text
error: cannot construct `Foo` with struct literal syntax due to private fields
|
|
--> $DIR/issue-76077.rs:8:5
|
|
|
|
|
LL | foo::Foo {};
|
|
| ^^^^^^^^
|
|
|
|
|
= note: private field `you_cant_use_this_field` that was not provided
|
|
|
|
error: aborting due to 1 previous error
|
|
|