diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2025-03-24 17:16:26 +0100 |
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2025-03-25 15:15:42 +0100 |
| commit | 598f8658744db0dc0215545d2193accd3a1ce8c8 (patch) | |
| tree | 6617de3e92e31c67574fd4bd9a15c0db5f4a74ab /tests/ui/parser/struct-literal-in-if.rs | |
| parent | 9f336ce2eb0ba04de7f1ddd2e1b0958e7df15c42 (diff) | |
| download | rust-598f8658744db0dc0215545d2193accd3a1ce8c8.tar.gz rust-598f8658744db0dc0215545d2193accd3a1ce8c8.zip | |
Combine several test files into one
This makes it a lot easier to add smaller regression tests related to "incorrectly placed" struct literals.
Diffstat (limited to 'tests/ui/parser/struct-literal-in-if.rs')
| -rw-r--r-- | tests/ui/parser/struct-literal-in-if.rs | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/tests/ui/parser/struct-literal-in-if.rs b/tests/ui/parser/struct-literal-in-if.rs deleted file mode 100644 index c4a253c3da2..00000000000 --- a/tests/ui/parser/struct-literal-in-if.rs +++ /dev/null @@ -1,22 +0,0 @@ -struct Foo { - x: isize, -} - -impl Foo { - fn hi(&self) -> bool { - true - } -} - -fn main() { - if Foo { //~ ERROR struct literals are not allowed here - x: 3 - }.hi() { - println!("yo"); - } - if let true = Foo { //~ ERROR struct literals are not allowed here - x: 3 - }.hi() { - println!("yo"); - } -} |
