Skip to content

Commit 05eed52

Browse files
committed
Update compile-fail tests
These now spit out errors for `<=` and `>=` as well.
1 parent 5fa157a commit 05eed52

6 files changed

+15
-5
lines changed

src/etc/generate-deriving-span-tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def write_file(name, string):
113113

114114
for (trait, supers, errs) in [('Clone', [], 1),
115115
('PartialEq', [], 2),
116-
('PartialOrd', ['PartialEq'], 3),
116+
('PartialOrd', ['PartialEq'], 5),
117117
('Eq', ['PartialEq'], 1),
118118
('Ord', ['Eq', 'PartialOrd', 'PartialEq'], 1),
119119
('Debug', [], 1),

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2018 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
//
@@ -19,6 +19,8 @@ enum Enum {
1919
x: Error //~ ERROR
2020
//~^ ERROR
2121
//~^^ ERROR
22+
//~^^^ ERROR
23+
//~^^^^ ERROR
2224
}
2325
}
2426

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2018 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
//
@@ -19,6 +19,8 @@ enum Enum {
1919
Error //~ ERROR
2020
//~^ ERROR
2121
//~^^ ERROR
22+
//~^^^ ERROR
23+
//~^^^^ ERROR
2224
)
2325
}
2426

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2018 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
//
@@ -18,6 +18,8 @@ struct Struct {
1818
x: Error //~ ERROR
1919
//~^ ERROR
2020
//~^^ ERROR
21+
//~^^^ ERROR
22+
//~^^^^ ERROR
2123
}
2224

2325
fn main() {}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2018 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
//
@@ -18,6 +18,8 @@ struct Struct(
1818
Error //~ ERROR
1919
//~^ ERROR
2020
//~^^ ERROR
21+
//~^^^ ERROR
22+
//~^^^^ ERROR
2123
);
2224

2325
fn main() {}

src/test/compile-fail/range_traits-1.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ struct AllTheRanges {
4242
//~^^ ERROR Ord
4343
//~^^^ ERROR binary operation `<` cannot be applied to type
4444
//~^^^^ ERROR binary operation `>` cannot be applied to type
45+
//~^^^^^ ERROR binary operation `<=` cannot be applied to type
46+
//~^^^^^^ ERROR binary operation `>=` cannot be applied to type
4547
}
4648

4749
fn main() {}

0 commit comments

Comments
 (0)