-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
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.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.