We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e51cee commit 612221fCopy full SHA for 612221f
src/librustc_typeck/diagnostics.rs
@@ -670,8 +670,31 @@ fn main() {
670
671
E0063: r##"
672
This error indicates that during an attempt to build a struct or struct-like
673
-enum variant, one of the fields was not provided. Each field should be
674
-specified exactly once.
+enum variant, one of the fields was not provided. Erroneous code example:
+
675
+```
676
+struct Foo {
677
+ x: i32,
678
+ y: i32
679
+}
680
681
+fn main() {
682
+ let x = Foo { x: 0 }; // error: missing field: `y`
683
684
685
686
+Each field should be specified exactly once. Example:
687
688
689
690
691
692
693
694
695
+ let x = Foo { x: 0, y: 0 }; // ok!
696
697
698
"##,
699
700
E0066: r##"
0 commit comments