diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-50618.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-50618.rs b/src/test/ui/issues/issue-50618.rs new file mode 100644 index 000000000..5f762bc43 --- /dev/null +++ b/src/test/ui/issues/issue-50618.rs @@ -0,0 +1,19 @@ +struct Point { + pub x: u64, + pub y: u64, +} + +const TEMPLATE: Point = Point { + x: 0, + y: 0 +}; + +fn main() { + let _ = || { + Point { + nonexistent: 0, + //~^ ERROR struct `Point` has no field named `nonexistent` + ..TEMPLATE + } + }; +} |