about summary refs log tree commit diff
path: root/src/test/run-pass/array-slice-vec/destructure-array-1.rs
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-07-27 01:33:01 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-07-27 18:56:16 +0300
commit9be35f82c1abf2ecbab489bca9eca138ea648312 (patch)
tree69888506e34af447d9748c0d542de3ba1dd76210 /src/test/run-pass/array-slice-vec/destructure-array-1.rs
parentca9faa52f5ada0054b1fa27d97aedf448afb059b (diff)
downloadrust-9be35f82c1abf2ecbab489bca9eca138ea648312.tar.gz
rust-9be35f82c1abf2ecbab489bca9eca138ea648312.zip
tests: Move run-pass tests without naming conflicts to ui
Diffstat (limited to 'src/test/run-pass/array-slice-vec/destructure-array-1.rs')
-rw-r--r--src/test/run-pass/array-slice-vec/destructure-array-1.rs27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/test/run-pass/array-slice-vec/destructure-array-1.rs b/src/test/run-pass/array-slice-vec/destructure-array-1.rs
deleted file mode 100644
index 74d893ee5b2..00000000000
--- a/src/test/run-pass/array-slice-vec/destructure-array-1.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// run-pass
-
-// Ensure that we can do a destructuring bind of a fixed-size array,
-// even when the element type has a destructor.
-
-struct D { x: u8 }
-
-impl Drop for D { fn drop(&mut self) { } }
-
-fn main() {
-    fn d(x: u8) -> D { D { x: x } }
-
-    let d1 = foo([d(1), d(2), d(3), d(4)], 1);
-    let d3 = foo([d(5), d(6), d(7), d(8)], 3);
-    assert_eq!(d1.x, 2);
-    assert_eq!(d3.x, 8);
-}
-
-fn foo([a, b, c, d]: [D; 4], i: usize) -> D {
-    match i {
-        0 => a,
-        1 => b,
-        2 => c,
-        3 => d,
-        _ => panic!("unmatched"),
-    }
-}