Closed
Description
From: src/test/compile-fail/E0450.rs
E0450 needs a span_label, updating it from:
error[E0450]: cannot invoke tuple struct constructor with private fields
--> src/test/compile-fail/E0450.rs:16:13
|
16 | let f = Bar::Foo(0); //~ ERROR E0450
| ^^^^^^^^
To:
error[E0450]: cannot invoke tuple struct constructor with private fields
--> src/test/compile-fail/E0450.rs:16:13
|
16 | let f = Bar::Foo(0); //~ ERROR E0450
| ^^^^^^^^ cannot construct with a private field
Bonus: add a label to where the private field comes from:
error[E0450]: cannot invoke tuple struct constructor with private fields
--> src/test/compile-fail/E0450.rs:16:13
|
12 | pub struct Foo(isize);
| ----- private field declared here
...
16 | let f = Bar::Foo(0); //~ ERROR E0450
| ^^^^^^^^ cannot construct with a private field
Alternatively, if underlining the private field is too tricky, just underline the whole tuple constructor definition.