Skip to content

Commit d1075fc

Browse files
committed
---
yaml --- r: 56698 b: refs/heads/try c: d375171 h: refs/heads/master v: v3
1 parent 08db722 commit d1075fc

File tree

4 files changed

+24
-30
lines changed

4 files changed

+24
-30
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: c081ffbd1e845687202a975ea2e698b623e5722f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 79a2b2eafc3c766cecec8a5f76317693bae9ed17
5-
refs/heads/try: b22a06000d68faf7fe080dc9fd5a2686502d212f
5+
refs/heads/try: d375171fd44247bff3e355fb82d88b83f14da442
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libcore/clone.rs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -73,3 +73,24 @@ clone_impl!(f64)
7373

7474
clone_impl!(bool)
7575
clone_impl!(char)
76+
77+
#[test]
78+
fn test_owned_clone() {
79+
let a : ~int = ~5i;
80+
let b : ~int = a.clone();
81+
assert!(a == b);
82+
}
83+
84+
#[test]
85+
fn test_managed_clone() {
86+
let a : @int = @5i;
87+
let b : @int = a.clone();
88+
assert!(a == b);
89+
}
90+
91+
#[test]
92+
fn test_managed_mut_clone() {
93+
let a : @int = @5i;
94+
let b : @int = a.clone();
95+
assert!(a == b);
96+
}

branches/try/src/test/run-pass/borrowck-borrow-from-expr-block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//

branches/try/src/test/run-pass/clones.rs

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)