librustc: Remove all uses of "copy".
This commit is contained in:
parent
b4e674f6e6
commit
99b33f7219
278 changed files with 3196 additions and 2610 deletions
|
@ -15,8 +15,8 @@
|
|||
// Tests for standalone blocks as expressions with dynamic type sizes
|
||||
type compare<T> = @fn(T, T) -> bool;
|
||||
|
||||
fn test_generic<T:Copy>(expected: T, eq: compare<T>) {
|
||||
let actual: T = { copy expected };
|
||||
fn test_generic<T:Clone>(expected: T, eq: compare<T>) {
|
||||
let actual: T = { expected.clone() };
|
||||
assert!((eq(expected, actual)));
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,11 @@ fn test_bool() {
|
|||
test_generic::<bool>(true, compare_bool);
|
||||
}
|
||||
|
||||
struct Pair {a: int, b: int}
|
||||
#[deriving(Clone)]
|
||||
struct Pair {
|
||||
a: int,
|
||||
b: int,
|
||||
}
|
||||
|
||||
fn test_rec() {
|
||||
fn compare_rec(t1: Pair, t2: Pair) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue