diff options
| author | Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> | 2023-01-05 09:13:28 +0100 |
|---|---|---|
| committer | Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> | 2023-01-11 09:32:08 +0000 |
| commit | cf2dff2b1e3fa55fa5415d524200070d0d7aacfe (patch) | |
| tree | 40a88d9a46aaf3e8870676eb2538378b75a263eb /src/test/ui/destructuring-assignment/struct_destructure.rs | |
| parent | ca855e6e42787ecd062d81d53336fe6788ef51a9 (diff) | |
| download | rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.tar.gz rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.zip | |
Move /src/test to /tests
Diffstat (limited to 'src/test/ui/destructuring-assignment/struct_destructure.rs')
| -rw-r--r-- | src/test/ui/destructuring-assignment/struct_destructure.rs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/test/ui/destructuring-assignment/struct_destructure.rs b/src/test/ui/destructuring-assignment/struct_destructure.rs deleted file mode 100644 index 8cceaadd7b9..00000000000 --- a/src/test/ui/destructuring-assignment/struct_destructure.rs +++ /dev/null @@ -1,20 +0,0 @@ -// run-pass - -struct Struct<S, T> { - a: S, - b: T, -} - -fn main() { - let (mut a, mut b); - Struct { a, b } = Struct { a: 0, b: 1 }; - assert_eq!((a, b), (0, 1)); - Struct { a: b, b: a } = Struct { a: 1, b: 2 }; - assert_eq!((a,b), (2, 1)); - Struct { a: _, b } = Struct { a: 1, b: 2 }; - assert_eq!((a, b), (2, 2)); - Struct { a, .. } = Struct { a: 1, b: 3 }; - assert_eq!((a, b), (1, 2)); - Struct { .. } = Struct { a: 1, b: 4 }; - assert_eq!((a, b), (1, 2)); -} |
