about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEduard Burtescu <edy.burt@gmail.com>2015-01-29 13:57:27 +0200
committerEduard Burtescu <edy.burt@gmail.com>2015-02-16 17:13:47 +0200
commit08967c7a7fc00d19029751f8a0d1780dcb7413f8 (patch)
treef641bcc9902f831f4c726dae74a5cab371ba983a
parent03295a715fe1231b04e389c5ee24180705e768b0 (diff)
downloadrust-08967c7a7fc00d19029751f8a0d1780dcb7413f8.tar.gz
rust-08967c7a7fc00d19029751f8a0d1780dcb7413f8.zip
tests: fix fallout from changed error messages.
-rw-r--r--src/test/compile-fail/const-block-non-item-statement.rs8
-rw-r--r--src/test/compile-fail/issue-16538.rs3
-rw-r--r--src/test/compile-fail/issue-18118.rs2
-rw-r--r--src/test/compile-fail/issue-7364.rs6
-rw-r--r--src/test/compile-fail/static-vec-repeat-not-constant.rs2
5 files changed, 11 insertions, 10 deletions
diff --git a/src/test/compile-fail/const-block-non-item-statement.rs b/src/test/compile-fail/const-block-non-item-statement.rs
index 62e8fccbda0..f66c68541b1 100644
--- a/src/test/compile-fail/const-block-non-item-statement.rs
+++ b/src/test/compile-fail/const-block-non-item-statement.rs
@@ -8,18 +8,18 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-static A: usize = { 1us; 2 };
+const A: usize = { 1us; 2 };
 //~^ ERROR: blocks in constants are limited to items and tail expressions
 
-static B: usize = { { } 2 };
+const B: usize = { { } 2 };
 //~^ ERROR: blocks in constants are limited to items and tail expressions
 
 macro_rules! foo {
     () => (()) //~ ERROR: blocks in constants are limited to items and tail expressions
 }
-static C: usize = { foo!(); 2 };
+const C: usize = { foo!(); 2 };
 
-static D: usize = { let x = 4us; 2 };
+const D: usize = { let x = 4us; 2 };
 //~^ ERROR: blocks in constants are limited to items and tail expressions
 
 pub fn main() {
diff --git a/src/test/compile-fail/issue-16538.rs b/src/test/compile-fail/issue-16538.rs
index a6b73dcc19c..6d2cfcab04e 100644
--- a/src/test/compile-fail/issue-16538.rs
+++ b/src/test/compile-fail/issue-16538.rs
@@ -20,6 +20,7 @@ mod Y {
 
 static foo: *const Y::X = Y::foo(Y::x as *const Y::X);
 //~^ ERROR cannot refer to other statics by value
-//~| ERROR: the trait `core::marker::Sync` is not implemented for the type
+//~| ERROR the trait `core::marker::Sync` is not implemented for the type
+//~| ERROR function calls in statics are limited to struct and enum constructors
 
 fn main() {}
diff --git a/src/test/compile-fail/issue-18118.rs b/src/test/compile-fail/issue-18118.rs
index 53df24d5b00..c5370879cc2 100644
--- a/src/test/compile-fail/issue-18118.rs
+++ b/src/test/compile-fail/issue-18118.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 pub fn main() {
-    static z: &'static isize = {
+    const z: &'static isize = {
         let p = 3;
         //~^ ERROR blocks in constants are limited to items and tail expressions
         &p
diff --git a/src/test/compile-fail/issue-7364.rs b/src/test/compile-fail/issue-7364.rs
index 8744afe2339..6a36b2f84bf 100644
--- a/src/test/compile-fail/issue-7364.rs
+++ b/src/test/compile-fail/issue-7364.rs
@@ -15,8 +15,8 @@ use std::cell::RefCell;
 // Regression test for issue 7364
 static boxed: Box<RefCell<isize>> = box RefCell::new(0);
 //~^ ERROR allocations are not allowed in statics
-//~| ERROR: the trait `core::marker::Sync` is not implemented for the type
-//~| ERROR: the trait `core::marker::Sync` is not implemented for the type
-//~^^^^^ ERROR function calls in constants are limited to struct and enum constructors
+//~| ERROR the trait `core::marker::Sync` is not implemented for the type
+//~| ERROR the trait `core::marker::Sync` is not implemented for the type
+//~| ERROR function calls in statics are limited to struct and enum constructors
 
 fn main() { }
diff --git a/src/test/compile-fail/static-vec-repeat-not-constant.rs b/src/test/compile-fail/static-vec-repeat-not-constant.rs
index 7cb7615526a..7a957564587 100644
--- a/src/test/compile-fail/static-vec-repeat-not-constant.rs
+++ b/src/test/compile-fail/static-vec-repeat-not-constant.rs
@@ -11,6 +11,6 @@
 fn foo() -> isize { 23 }
 
 static a: [isize; 2] = [foo(); 2];
-//~^ ERROR: function calls in constants are limited to struct and enum constructors
+//~^ ERROR: function calls in statics are limited to struct and enum constructors
 
 fn main() {}