diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
commit | a4b7ed7a42c716ab9f05e351f003d589124fd55d (patch) | |
tree | b620cd3f223850b28716e474e80c58059dca5dd4 /src/test/ui/parser/issues/issue-57684.fixed | |
parent | Adding upstream version 1.67.1+dfsg1. (diff) | |
download | rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip |
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/parser/issues/issue-57684.fixed')
-rw-r--r-- | src/test/ui/parser/issues/issue-57684.fixed | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/test/ui/parser/issues/issue-57684.fixed b/src/test/ui/parser/issues/issue-57684.fixed deleted file mode 100644 index 4a432206d..000000000 --- a/src/test/ui/parser/issues/issue-57684.fixed +++ /dev/null @@ -1,37 +0,0 @@ -// run-rustfix - -#![allow(warnings)] - -// This test checks that the following error is emitted when a `=` character is used to initialize -// a struct field when a `:` is expected. -// -// ``` -// error: struct fields are initialized with a colon -// --> $DIR/issue-57684.rs:12:20 -// | -// LL | let _ = X { f1 = 5 }; -// | ^ help: replace equals symbol with a colon: `:` -// ``` - -struct X { - f1: i32, -} - -struct Y { - f1: i32, - f2: i32, - f3: i32, -} - -fn main() { - let _ = X { f1: 5 }; - //~^ ERROR expected `:`, found `=` - - let f3 = 3; - let _ = Y { - f1: 5, - //~^ ERROR expected `:`, found `=` - f2: 4, - f3, - }; -} |