about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2015-02-22 16:38:22 +0100
committerFelix S. Klock II <pnkfelix@pnkfx.org>2015-03-03 12:10:58 +0100
commit8491c82c905d9b6d72742fd6dd0ec82c021bb800 (patch)
tree22b752d4372737f41a609f7a113db76f0a406f6b
parent46de12ad0064e7879b1d8ce07e96e1e31274b881 (diff)
downloadrust-8491c82c905d9b6d72742fd6dd0ec82c021bb800.tar.gz
rust-8491c82c905d9b6d72742fd6dd0ec82c021bb800.zip
Update tests for const-eval error handling changes.
-rw-r--r--src/test/compile-fail/issue-18389.rs1
-rw-r--r--src/test/compile-fail/issue-19244-1.rs4
-rw-r--r--src/test/compile-fail/issue-19244-2.rs4
-rw-r--r--src/test/compile-fail/non-constant-expr-for-fixed-len-vec.rs3
4 files changed, 9 insertions, 3 deletions
diff --git a/src/test/compile-fail/issue-18389.rs b/src/test/compile-fail/issue-18389.rs
index 20323e99003..9065a5b9605 100644
--- a/src/test/compile-fail/issue-18389.rs
+++ b/src/test/compile-fail/issue-18389.rs
@@ -23,6 +23,7 @@ pub trait Public: Private<
     <Self as Public>::P,
 //~^ ERROR illegal recursive type; insert an enum or struct in the cycle, if this is desired
     <Self as Public>::R
+//~^ ERROR unsupported cyclic reference between types/traits detected
 > {
     type P;
     type R;
diff --git a/src/test/compile-fail/issue-19244-1.rs b/src/test/compile-fail/issue-19244-1.rs
index 0850705aee6..5c11787d467 100644
--- a/src/test/compile-fail/issue-19244-1.rs
+++ b/src/test/compile-fail/issue-19244-1.rs
@@ -12,5 +12,7 @@ const TUP: (usize,) = (42,);
 
 fn main() {
     let a: [isize; TUP.1];
-    //~^ ERROR expected constant expr for array length: tuple index out of bounds
+    //~^ ERROR array length constant evaluation error: tuple index out of bounds
+    //~| ERROR attempted out-of-bounds tuple index
+    //~| ERROR attempted out-of-bounds tuple index
 }
diff --git a/src/test/compile-fail/issue-19244-2.rs b/src/test/compile-fail/issue-19244-2.rs
index 93a3fc87eb0..d896f768659 100644
--- a/src/test/compile-fail/issue-19244-2.rs
+++ b/src/test/compile-fail/issue-19244-2.rs
@@ -13,5 +13,7 @@ const STRUCT: MyStruct = MyStruct { field: 42 };
 
 fn main() {
     let a: [isize; STRUCT.nonexistent_field];
-    //~^ ERROR expected constant expr for array length: nonexistent struct field
+    //~^ ERROR array length constant evaluation error: nonexistent struct field
+    //~| ERROR attempted access of field `nonexistent_field`
+    //~| ERROR attempted access of field `nonexistent_field`
 }
diff --git a/src/test/compile-fail/non-constant-expr-for-fixed-len-vec.rs b/src/test/compile-fail/non-constant-expr-for-fixed-len-vec.rs
index 14d2c8d0326..59e910ec6af 100644
--- a/src/test/compile-fail/non-constant-expr-for-fixed-len-vec.rs
+++ b/src/test/compile-fail/non-constant-expr-for-fixed-len-vec.rs
@@ -13,6 +13,7 @@
 fn main() {
     fn bar(n: isize) {
         let _x: [isize; n];
-        //~^ ERROR expected constant expr for array length: non-constant path in constant expr
+        //~^ ERROR no type for local variable
+        //~| ERROR array length constant evaluation error: non-constant path in constant expr
     }
 }