about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2016-10-30 23:06:30 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2016-12-20 11:37:15 +0100
commiteaa2ddb04f6f56e48af789dc757982cf99f8fe35 (patch)
tree88e62f33eec3373ea7b245b93b61d43f24daeb23 /src/test
parent66057a7f7292c49eefae7cd386aa183201a49ca2 (diff)
downloadrust-eaa2ddb04f6f56e48af789dc757982cf99f8fe35.tar.gz
rust-eaa2ddb04f6f56e48af789dc757982cf99f8fe35.zip
fix tests
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/coerce_suggestions.rs44
-rw-r--r--src/test/compile-fail/coercion-slice.rs2
-rw-r--r--src/test/compile-fail/cross-borrow-trait.rs1
-rw-r--r--src/test/compile-fail/dst-bad-coercions.rs2
-rw-r--r--src/test/compile-fail/issue-13058.rs1
5 files changed, 30 insertions, 20 deletions
diff --git a/src/test/compile-fail/coerce_suggestions.rs b/src/test/compile-fail/coerce_suggestions.rs
index decd589e6f4..3177e858ff4 100644
--- a/src/test/compile-fail/coerce_suggestions.rs
+++ b/src/test/compile-fail/coerce_suggestions.rs
@@ -8,34 +8,40 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(box_syntax)]
+
 fn test(_x: &mut String) {}
 fn test2(_x: &mut i32) {}
 
 fn main() {
     let x: usize = String::new();
-    //^ ERROR E0308
-    //| NOTE expected type `usize`
-    //| NOTE found type `std::string::String`
-    //| NOTE here are some functions which might fulfill your needs:
+    //~^ ERROR E0308
+    //~| NOTE expected usize, found struct `std::string::String`
+    //~| NOTE expected type `usize`
+    //~| NOTE found type `std::string::String`
+    //~| HELP here are some functions which might fulfill your needs:
     let x: &str = String::new();
-    //^ ERROR E0308
-    //| NOTE expected type `&str`
-    //| NOTE found type `std::string::String`
-    //| NOTE try with `&String::new()`
+    //~^ ERROR E0308
+    //~| NOTE expected &str, found struct `std::string::String`
+    //~| NOTE expected type `&str`
+    //~| NOTE found type `std::string::String`
+    //~| HELP try with `&String::new()`
     let y = String::new();
     test(&y);
-    //^ ERROR E0308
-    //| NOTE expected type `&mut std::string::String`
-    //| NOTE found type `&std::string::String`
-    //| NOTE try with `&mut y`
+    //~^ ERROR E0308
+    //~| NOTE types differ in mutability
+    //~| NOTE expected type `&mut std::string::String`
+    //~| NOTE found type `&std::string::String`
+    //~| HELP try with `&mut y`
     test2(&y);
-    //^ ERROR E0308
-    //| NOTE expected type `&mut i32`
-    //| NOTE found type `&std::string::String`
-    //| NOTE try with `&mut y`
+    //~^ ERROR E0308
+    //~| NOTE types differ in mutability
+    //~| NOTE expected type `&mut i32`
+    //~| NOTE found type `&std::string::String`
     let f;
     f = box f;
-    //^ ERROR E0308
-    //| NOTE expected type `_`
-    //| NOTE found type `Box<_>`
+    //~^ ERROR E0308
+    //~| NOTE cyclic type of infinite size
+    //~| NOTE expected type `_`
+    //~| NOTE found type `Box<_>`
 }
diff --git a/src/test/compile-fail/coercion-slice.rs b/src/test/compile-fail/coercion-slice.rs
index 6b468ff9662..f5090088399 100644
--- a/src/test/compile-fail/coercion-slice.rs
+++ b/src/test/compile-fail/coercion-slice.rs
@@ -14,6 +14,6 @@ fn main() {
     let _: &[i32] = [0];
     //~^ ERROR mismatched types
     //~| expected type `&[i32]`
-    //~| found type `[{integer}; 1]`
+    //~| found type `[i32; 1]`
     //~| expected &[i32], found array of 1 elements
 }
diff --git a/src/test/compile-fail/cross-borrow-trait.rs b/src/test/compile-fail/cross-borrow-trait.rs
index 672ff464718..975bc1300aa 100644
--- a/src/test/compile-fail/cross-borrow-trait.rs
+++ b/src/test/compile-fail/cross-borrow-trait.rs
@@ -22,4 +22,5 @@ pub fn main() {
                         //~| expected type `&Trait`
                         //~| found type `Box<Trait>`
                         //~| expected &Trait, found box
+                        //~^^^^ ERROR E0277
 }
diff --git a/src/test/compile-fail/dst-bad-coercions.rs b/src/test/compile-fail/dst-bad-coercions.rs
index 883c16b0895..728b016b30f 100644
--- a/src/test/compile-fail/dst-bad-coercions.rs
+++ b/src/test/compile-fail/dst-bad-coercions.rs
@@ -23,11 +23,13 @@ pub fn main() {
     let x: *const S = &S;
     let y: &S = x; //~ ERROR mismatched types
     let y: &T = x; //~ ERROR mismatched types
+                   //~^ ERROR E0277
 
     // Test that we cannot convert from *-ptr to &S and &T (mut version)
     let x: *mut S = &mut S;
     let y: &S = x; //~ ERROR mismatched types
     let y: &T = x; //~ ERROR mismatched types
+                   //~^ ERROR E0277
 
     // Test that we cannot convert an immutable ptr to a mutable one using *-ptrs
     let x: &mut T = &S; //~ ERROR mismatched types
diff --git a/src/test/compile-fail/issue-13058.rs b/src/test/compile-fail/issue-13058.rs
index de578257e46..df6675510ff 100644
--- a/src/test/compile-fail/issue-13058.rs
+++ b/src/test/compile-fail/issue-13058.rs
@@ -36,4 +36,5 @@ fn check<'r, I: Iterator<Item=usize>, T: Itble<'r, usize, I>>(cont: &T) -> bool
 fn main() {
     check((3, 5));
 //~^ ERROR mismatched types
+//~| HELP try with `&(3, 5)`
 }