about summary refs log tree commit diff
path: root/src/libcore/util.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-09-04 15:23:28 -0700
committerBrian Anderson <banderson@mozilla.com>2012-09-04 15:46:33 -0700
commit02b1c32e4d3c607da8b3a48640e597f089375765 (patch)
treeaeabef9ffc26c4d9c89dd3eb7a20623cc45f5290 /src/libcore/util.rs
parentab9cf45a7ce839cee58e745d8b3472db2e707731 (diff)
downloadrust-02b1c32e4d3c607da8b3a48640e597f089375765.tar.gz
rust-02b1c32e4d3c607da8b3a48640e597f089375765.zip
core: Remove struct ctors
Diffstat (limited to 'src/libcore/util.rs')
-rw-r--r--src/libcore/util.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcore/util.rs b/src/libcore/util.rs
index f0b4a344307..57590dbfc3e 100644
--- a/src/libcore/util.rs
+++ b/src/libcore/util.rs
@@ -55,10 +55,11 @@ fn replace<T>(dest: &mut T, +src: T) -> T {
 /// A non-copyable dummy type.
 struct NonCopyable {
     i: ();
-    new() { self.i = (); }
     drop { }
 }
 
+fn NonCopyable() -> NonCopyable { NonCopyable { i: () } }
+
 mod tests {
     #[test]
     fn identity_crisis() {