Skip to content

Commit 30e1492

Browse files
committed
Use derive rather than deriving in tests
1 parent 7506fe5 commit 30e1492

File tree

213 files changed

+320
-320
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

213 files changed

+320
-320
lines changed

src/test/auxiliary/trait_inheritance_overloading_xc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::cmp::PartialEq;
1313
pub trait MyNum : Add<Self,Self> + Sub<Self,Self> + Mul<Self,Self> + PartialEq + Clone {
1414
}
1515

16-
#[deriving(Clone, Show)]
16+
#[derive(Clone, Show)]
1717
pub struct MyInt {
1818
pub val: int
1919
}

src/test/bench/shootout-k-nucleotide.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static OCCURRENCES: [&'static str;5] = [
6060

6161
// Code implementation
6262

63-
#[deriving(PartialEq, PartialOrd, Ord, Eq)]
63+
#[derive(PartialEq, PartialOrd, Ord, Eq)]
6464
struct Code(u64);
6565

6666
impl Copy for Code {}

src/test/bench/task-perf-alloc-unwind.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use std::os;
1414
use std::task;
1515
use std::time::Duration;
1616

17-
#[deriving(Clone)]
17+
#[derive(Clone)]
1818
enum List<T> {
1919
Nil, Cons(T, Box<List<T>>)
2020
}

src/test/compile-fail/attr-before-eof.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[deriving(Show)] //~ERROR expected item after attributes
11+
#[derive(Show)] //~ERROR expected item after attributes

src/test/compile-fail/borrowck-init-in-fru.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[deriving(Clone)]
11+
#[derive(Clone)]
1212
struct point {
1313
x: int,
1414
y: int,

src/test/compile-fail/borrowck-loan-in-overloaded-op.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111

12-
#[deriving(Clone)]
12+
#[derive(Clone)]
1313
struct foo(Box<uint>);
1414

1515
impl Add<foo, foo> for foo {

src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[deriving(Copy)]
11+
#[derive(Copy)]
1212
struct Point {
1313
x: int,
1414
y: int,

src/test/compile-fail/borrowck-move-out-of-vec-tail.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// Test that we do not permit moves from &[] matched by a vec pattern.
1212

13-
#[deriving(Clone, Show)]
13+
#[derive(Clone, Show)]
1414
struct Foo {
1515
string: String
1616
}

src/test/compile-fail/coherence-blanket-conflicts-with-specific-multidispatch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ impl<T> MyTrait<T> for T { //~ ERROR E0119
2424
}
2525
}
2626

27-
#[deriving(Clone)]
27+
#[derive(Clone)]
2828
struct MyType {
2929
dummy: uint
3030
}

src/test/compile-fail/copy-a-resource.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[deriving(Show)]
11+
#[derive(Show)]
1212
struct foo {
1313
i: int,
1414
}

src/test/compile-fail/deriving-bounds.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[deriving(Copy(Bad))]
11+
#[derive(Copy(Bad))]
1212
//~^ ERROR unexpected value in deriving, expected a trait
1313
struct Test;
1414

15-
#[deriving(Sync)]
15+
#[derive(Sync)]
1616
//~^ ERROR Sync is an unsafe trait and it should be implemented explicitly
1717
struct Test1;
1818

src/test/compile-fail/deriving-meta-unknown-trait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[deriving(Eqr)] //~ ERROR unknown `deriving` trait: `Eqr`
11+
#[derive(Eqr)] //~ ERROR unknown `derive` trait: `Eqr`
1212
struct Foo;
1313

1414
pub fn main() {}

src/test/compile-fail/deriving-no-inner-impl-error-message.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
struct NoCloneOrEq;
1212

13-
#[deriving(PartialEq)]
13+
#[derive(PartialEq)]
1414
struct E {
1515
x: NoCloneOrEq //~ ERROR binary operation `==` cannot be applied to type `NoCloneOrEq`
1616
//~^ ERROR binary operation `!=` cannot be applied to type `NoCloneOrEq`
1717
}
18-
#[deriving(Clone)]
18+
#[derive(Clone)]
1919
struct C {
2020
x: NoCloneOrEq
2121
//~^ ERROR the trait `core::clone::Clone` is not implemented for the type `NoCloneOrEq`

src/test/compile-fail/deriving-non-type.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,29 @@
1212

1313
struct S;
1414

15-
#[deriving(PartialEq)] //~ ERROR: `deriving` may only be applied to structs and enums
15+
#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums
1616
trait T { }
1717

18-
#[deriving(PartialEq)] //~ ERROR: `deriving` may only be applied to structs and enums
18+
#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums
1919
impl S { }
2020

21-
#[deriving(PartialEq)] //~ ERROR: `deriving` may only be applied to structs and enums
21+
#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums
2222
impl T for S { }
2323

24-
#[deriving(PartialEq)] //~ ERROR: `deriving` may only be applied to structs and enums
24+
#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums
2525
static s: uint = 0u;
2626

27-
#[deriving(PartialEq)] //~ ERROR: `deriving` may only be applied to structs and enums
27+
#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums
2828
const c: uint = 0u;
2929

30-
#[deriving(PartialEq)] //~ ERROR: `deriving` may only be applied to structs and enums
30+
#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums
3131
mod m { }
3232

33-
#[deriving(PartialEq)] //~ ERROR: `deriving` may only be applied to structs and enums
33+
#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums
3434
extern "C" { }
3535

36-
#[deriving(PartialEq)] //~ ERROR: `deriving` may only be applied to structs and enums
36+
#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums
3737
type A = uint;
3838

39-
#[deriving(PartialEq)] //~ ERROR: `deriving` may only be applied to structs and enums
39+
#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums
4040
fn main() { }

src/test/compile-fail/deriving-primitive.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@
1111
use std::num::FromPrimitive;
1212
use std::int;
1313

14-
#[deriving(FromPrimitive)]
14+
#[derive(FromPrimitive)]
1515
struct A { x: int }
1616
//~^^ ERROR `FromPrimitive` cannot be derived for structs
1717
//~^^^ ERROR `FromPrimitive` cannot be derived for structs
1818

19-
#[deriving(FromPrimitive)]
19+
#[derive(FromPrimitive)]
2020
struct B(int);
2121
//~^^ ERROR `FromPrimitive` cannot be derived for structs
2222
//~^^^ ERROR `FromPrimitive` cannot be derived for structs
2323

24-
#[deriving(FromPrimitive)]
24+
#[derive(FromPrimitive)]
2525
enum C { Foo(int), Bar(uint) }
2626
//~^^ ERROR `FromPrimitive` cannot be derived for enum variants with arguments
2727
//~^^^ ERROR `FromPrimitive` cannot be derived for enum variants with arguments
2828

29-
#[deriving(FromPrimitive)]
29+
#[derive(FromPrimitive)]
3030
enum D { Baz { x: int } }
3131
//~^^ ERROR `FromPrimitive` cannot be derived for enums with struct variants
3232
//~^^^ ERROR `FromPrimitive` cannot be derived for enums with struct variants

src/test/compile-fail/deriving-span-Clone-enum-struct-variant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern crate rand;
1515

1616
struct Error;
1717

18-
#[deriving(Clone)]
18+
#[derive(Clone)]
1919
enum Enum {
2020
A {
2121
x: Error //~ ERROR

src/test/compile-fail/deriving-span-Clone-enum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern crate rand;
1515

1616
struct Error;
1717

18-
#[deriving(Clone)]
18+
#[derive(Clone)]
1919
enum Enum {
2020
A(
2121
Error //~ ERROR

src/test/compile-fail/deriving-span-Clone-struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern crate rand;
1515

1616
struct Error;
1717

18-
#[deriving(Clone)]
18+
#[derive(Clone)]
1919
struct Struct {
2020
x: Error //~ ERROR
2121
}

src/test/compile-fail/deriving-span-Clone-tuple-struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern crate rand;
1515

1616
struct Error;
1717

18-
#[deriving(Clone)]
18+
#[derive(Clone)]
1919
struct Struct(
2020
Error //~ ERROR
2121
);

src/test/compile-fail/deriving-span-Default-struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern crate rand;
1515

1616
struct Error;
1717

18-
#[deriving(Default)]
18+
#[derive(Default)]
1919
struct Struct {
2020
x: Error //~ ERROR `core::default::Default` is not implemented
2121
}

src/test/compile-fail/deriving-span-Default-tuple-struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern crate rand;
1515

1616
struct Error;
1717

18-
#[deriving(Default)]
18+
#[derive(Default)]
1919
struct Struct(
2020
Error //~ ERROR
2121
);

src/test/compile-fail/deriving-span-Hash-enum-struct-variant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern crate rand;
1515

1616
struct Error;
1717

18-
#[deriving(Hash)]
18+
#[derive(Hash)]
1919
enum Enum {
2020
A {
2121
x: Error //~ ERROR

src/test/compile-fail/deriving-span-Hash-enum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern crate rand;
1515

1616
struct Error;
1717

18-
#[deriving(Hash)]
18+
#[derive(Hash)]
1919
enum Enum {
2020
A(
2121
Error //~ ERROR

src/test/compile-fail/deriving-span-Hash-struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern crate rand;
1515

1616
struct Error;
1717

18-
#[deriving(Hash)]
18+
#[derive(Hash)]
1919
struct Struct {
2020
x: Error //~ ERROR
2121
}

src/test/compile-fail/deriving-span-Hash-tuple-struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern crate rand;
1515

1616
struct Error;
1717

18-
#[deriving(Hash)]
18+
#[derive(Hash)]
1919
struct Struct(
2020
Error //~ ERROR
2121
);

src/test/compile-fail/deriving-span-PartialEq-enum-struct-variant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern crate rand;
1515

1616
struct Error;
1717

18-
#[deriving(PartialEq)]
18+
#[derive(PartialEq)]
1919
enum Enum {
2020
A {
2121
x: Error //~ ERROR

src/test/compile-fail/deriving-span-PartialEq-enum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern crate rand;
1515

1616
struct Error;
1717

18-
#[deriving(PartialEq)]
18+
#[derive(PartialEq)]
1919
enum Enum {
2020
A(
2121
Error //~ ERROR

src/test/compile-fail/deriving-span-PartialEq-struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern crate rand;
1515

1616
struct Error;
1717

18-
#[deriving(PartialEq)]
18+
#[derive(PartialEq)]
1919
struct Struct {
2020
x: Error //~ ERROR
2121
//~^ ERROR

src/test/compile-fail/deriving-span-PartialEq-tuple-struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern crate rand;
1515

1616
struct Error;
1717

18-
#[deriving(PartialEq)]
18+
#[derive(PartialEq)]
1919
struct Struct(
2020
Error //~ ERROR
2121
//~^ ERROR

src/test/compile-fail/deriving-span-PartialOrd-enum-struct-variant.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
extern crate rand;
1414

15-
#[deriving(PartialEq)]
15+
#[derive(PartialEq)]
1616
struct Error;
1717

18-
#[deriving(PartialOrd,PartialEq)]
18+
#[derive(PartialOrd,PartialEq)]
1919
enum Enum {
2020
A {
2121
x: Error //~ ERROR

src/test/compile-fail/deriving-span-PartialOrd-enum.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
extern crate rand;
1414

15-
#[deriving(PartialEq)]
15+
#[derive(PartialEq)]
1616
struct Error;
1717

18-
#[deriving(PartialOrd,PartialEq)]
18+
#[derive(PartialOrd,PartialEq)]
1919
enum Enum {
2020
A(
2121
Error //~ ERROR

src/test/compile-fail/deriving-span-PartialOrd-struct.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
extern crate rand;
1414

15-
#[deriving(PartialEq)]
15+
#[derive(PartialEq)]
1616
struct Error;
1717

18-
#[deriving(PartialOrd,PartialEq)]
18+
#[derive(PartialOrd,PartialEq)]
1919
struct Struct {
2020
x: Error //~ ERROR
2121
//~^ ERROR

src/test/compile-fail/deriving-span-PartialOrd-tuple-struct.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
extern crate rand;
1414

15-
#[deriving(PartialEq)]
15+
#[derive(PartialEq)]
1616
struct Error;
1717

18-
#[deriving(PartialOrd,PartialEq)]
18+
#[derive(PartialOrd,PartialEq)]
1919
struct Struct(
2020
Error //~ ERROR
2121
//~^ ERROR

src/test/compile-fail/deriving-span-Rand-enum-struct-variant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern crate rand;
1515

1616
struct Error;
1717

18-
#[deriving(Rand)]
18+
#[derive(Rand)]
1919
enum Enum {
2020
A {
2121
x: Error //~ ERROR

src/test/compile-fail/deriving-span-Rand-enum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern crate rand;
1515

1616
struct Error;
1717

18-
#[deriving(Rand)]
18+
#[derive(Rand)]
1919
enum Enum {
2020
A(
2121
Error //~ ERROR

src/test/compile-fail/deriving-span-Rand-struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern crate rand;
1515

1616
struct Error;
1717

18-
#[deriving(Rand)]
18+
#[derive(Rand)]
1919
struct Struct {
2020
x: Error //~ ERROR
2121
}

0 commit comments

Comments
 (0)