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