File tree Expand file tree Collapse file tree 2 files changed +26
-3
lines changed
branches/try/src/librustc_typeck Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: edeb4f1c86cbf6af8ef9874d4b3af50f721ea1b8
3
3
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4
- refs/heads/try: 9e51cee69a24704facbdf0a9b0a8e4fe5f9c85ac
4
+ refs/heads/try: 612221ff8035b21a343c73921334071346609eb9
5
5
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
6
6
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
7
7
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -670,8 +670,31 @@ fn main() {
670
670
671
671
E0063 : r##"
672
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.
673
+ enum variant, one of the fields was not provided. Erroneous code example:
674
+
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
+ struct Foo {
690
+ x: i32,
691
+ y: i32
692
+ }
693
+
694
+ fn main() {
695
+ let x = Foo { x: 0, y: 0 }; // ok!
696
+ }
697
+ ```
675
698
"## ,
676
699
677
700
E0066 : r##"
You can’t perform that action at this time.
0 commit comments