summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2016-03-11 13:36:46 -0500
committerNiko Matsakis <niko@alum.mit.edu>2016-03-25 06:45:42 -0400
commit56ebf2b046fd4f0b9d05a90ff1e8a38b62be0325 (patch)
treef45e35432b7a210adfe47c36fb46da729947096d /src/test
parent73b4f06b83fd7a7ab4bcc9bf2ac97844f3b27df5 (diff)
downloadrust-56ebf2b046fd4f0b9d05a90ff1e8a38b62be0325.tar.gz
rust-56ebf2b046fd4f0b9d05a90ff1e8a38b62be0325.zip
fallout in existing tests
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/issue-6804.rs8
-rw-r--r--src/test/debuginfo/constant-in-match-pattern.rs3
-rw-r--r--src/test/run-pass/associated-const-match-patterns.rs1
-rw-r--r--src/test/run-pass/empty-struct-braces.rs3
-rw-r--r--src/test/run-pass/issue-12860.rs2
-rw-r--r--src/test/run-pass/match-arm-statics.rs11
6 files changed, 25 insertions, 3 deletions
diff --git a/src/test/compile-fail/issue-6804.rs b/src/test/compile-fail/issue-6804.rs
index ffab194149e..1cb5dbccf21 100644
--- a/src/test/compile-fail/issue-6804.rs
+++ b/src/test/compile-fail/issue-6804.rs
@@ -24,9 +24,17 @@ fn main() { //~ ERROR compilation successful
         _ => {},
     };
     //~^^^ WARNING unmatchable NaN in pattern, use the is_nan method in a guard instead
+    //~| WARNING floating point constants cannot be used
+    //~| WARNING this was previously accepted
+    //~| WARNING floating point constants cannot be used
+    //~| WARNING this was previously accepted
     match [x, 1.0] {
         [NAN, _] => {},
         _ => {},
     };
     //~^^^ WARNING unmatchable NaN in pattern, use the is_nan method in a guard instead
+    //~| WARNING floating point constants cannot be used
+    //~| WARNING this was previously accepted
+    //~| WARNING floating point constants cannot be used
+    //~| WARNING this was previously accepted
 }
diff --git a/src/test/debuginfo/constant-in-match-pattern.rs b/src/test/debuginfo/constant-in-match-pattern.rs
index fb40400a442..6974238ac72 100644
--- a/src/test/debuginfo/constant-in-match-pattern.rs
+++ b/src/test/debuginfo/constant-in-match-pattern.rs
@@ -21,15 +21,18 @@
 
 const CONSTANT: u64 = 3;
 
+#[derive(PartialEq, Eq)]
 struct Struct {
     a: isize,
     b: usize,
 }
 const STRUCT: Struct = Struct { a: 1, b: 2 };
 
+#[derive(PartialEq, Eq)]
 struct TupleStruct(u32);
 const TUPLE_STRUCT: TupleStruct = TupleStruct(4);
 
+#[derive(PartialEq, Eq)]
 enum Enum {
     Variant1(char),
     Variant2 { a: u8 },
diff --git a/src/test/run-pass/associated-const-match-patterns.rs b/src/test/run-pass/associated-const-match-patterns.rs
index 605ca6b65e2..01d1b27bfc9 100644
--- a/src/test/run-pass/associated-const-match-patterns.rs
+++ b/src/test/run-pass/associated-const-match-patterns.rs
@@ -17,6 +17,7 @@ use empty_struct::XEmpty2 as XFoo;
 
 struct Foo;
 
+#[derive(PartialEq, Eq)]
 enum Bar {
     Var1,
     Var2,
diff --git a/src/test/run-pass/empty-struct-braces.rs b/src/test/run-pass/empty-struct-braces.rs
index 85ae77f20f1..0060150fbec 100644
--- a/src/test/run-pass/empty-struct-braces.rs
+++ b/src/test/run-pass/empty-struct-braces.rs
@@ -18,7 +18,10 @@ use empty_struct::*;
 
 struct Empty1 {}
 struct Empty2;
+
+#[derive(PartialEq, Eq)]
 struct Empty3 {}
+
 const Empty3: Empty3 = Empty3 {};
 
 enum E {
diff --git a/src/test/run-pass/issue-12860.rs b/src/test/run-pass/issue-12860.rs
index c854747bcf7..5c9ee74472b 100644
--- a/src/test/run-pass/issue-12860.rs
+++ b/src/test/run-pass/issue-12860.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// pretty-expanded FIXME #23616
-
 #![feature(collections)]
 
 extern crate collections;
diff --git a/src/test/run-pass/match-arm-statics.rs b/src/test/run-pass/match-arm-statics.rs
index 43ff69fe75e..9700ed24795 100644
--- a/src/test/run-pass/match-arm-statics.rs
+++ b/src/test/run-pass/match-arm-statics.rs
@@ -9,18 +9,24 @@
 // except according to those terms.
 
 
+#[derive(PartialEq, Eq)]
 struct NewBool(bool);
 
+#[derive(PartialEq, Eq)]
 enum Direction {
     North,
     East,
     South,
     West
 }
+
+#[derive(PartialEq, Eq)]
 struct Foo {
     bar: Option<Direction>,
     baz: NewBool
 }
+
+#[derive(PartialEq, Eq)]
 enum EnumWithStructVariants {
     Variant1(bool),
     Variant2 {
@@ -37,7 +43,7 @@ const VARIANT2_NORTH: EnumWithStructVariants = EnumWithStructVariants::Variant2
     dir: Direction::North };
 
 pub mod glfw {
-    #[derive(Copy, Clone)]
+    #[derive(Copy, Clone, PartialEq, Eq)]
     pub struct InputState(usize);
 
     pub const RELEASE  : InputState = InputState(0);
@@ -82,6 +88,7 @@ fn issue_14576() {
         _ => unreachable!()
     }
 
+    #[derive(PartialEq, Eq)]
     enum C { D = 3, E = 4 }
     const F : C = C::D;
 
@@ -89,6 +96,7 @@ fn issue_14576() {
 }
 
 fn issue_13731() {
+    #[derive(PartialEq, Eq)]
     enum A { AA(()) }
     const B: A = A::AA(());
 
@@ -99,6 +107,7 @@ fn issue_13731() {
 
 fn issue_15393() {
     #![allow(dead_code)]
+    #[derive(PartialEq, Eq)]
     struct Flags {
         bits: usize
     }