about summary refs log tree commit diff
path: root/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.rs')
-rw-r--r--src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.rs19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.rs b/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.rs
deleted file mode 100644
index 815567ffec3..00000000000
--- a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// run-rustfix
-struct X {
-    x: String,
-}
-
-impl Drop for X {
-    fn drop(&mut self) {
-        println!("value: {}", self.x);
-    }
-}
-
-fn main() {
-    let x = X { x: "hello".to_string() };
-
-    match x {
-    //~^ ERROR cannot move out of type `X`, which implements the `Drop` trait
-        X { x: y } => println!("contents: {}", y)
-    }
-}