about summary refs log tree commit diff
path: root/src/test/compile-fail/functional-struct-update.rs
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2013-01-31 17:12:29 -0800
committerNiko Matsakis <niko@alum.mit.edu>2013-02-07 05:53:30 -0800
commita32498d8464e0dfa4e2cb31967a66e076da40109 (patch)
tree62fc02049c4d06ccd64a704f6f9e3af53d2835e3 /src/test/compile-fail/functional-struct-update.rs
parent82d73963334f01b818cda767b44cd0c8f3baf4cc (diff)
downloadrust-a32498d8464e0dfa4e2cb31967a66e076da40109.tar.gz
rust-a32498d8464e0dfa4e2cb31967a66e076da40109.zip
Make ~fn non-copyable, make &fn copyable, split barefn/closure types,
correct handling of moves for struct-record update.

Part of #3678.  Fixes #2828, #3904, #4719.
Diffstat (limited to 'src/test/compile-fail/functional-struct-update.rs')
-rw-r--r--src/test/compile-fail/functional-struct-update.rs31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/test/compile-fail/functional-struct-update.rs b/src/test/compile-fail/functional-struct-update.rs
deleted file mode 100644
index c0430a6a8bb..00000000000
--- a/src/test/compile-fail/functional-struct-update.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Bar {
-    x: int,
-}
-
-impl Bar : Drop {
-    fn finalize(&self) {
-        io::println("Goodbye, cruel world");
-    }
-}
-
-struct Foo {
-    x: int,
-    y: Bar
-}
-
-fn main() {
-    let a = Foo { x: 1, y: Bar { x: 5 } };
-    let c = Foo { x: 4, .. a}; //~ ERROR cannot copy field `y` of base expression, which has a noncopyable type
-    io::println(fmt!("%?", c));
-}
-