]> git.lizzy.rs Git - rust.git/commitdiff
Update tests
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Tue, 8 Nov 2016 21:55:58 +0000 (22:55 +0100)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Fri, 21 Apr 2017 10:28:24 +0000 (12:28 +0200)
src/test/compile-fail/coercion-slice.rs
src/test/compile-fail/cross-borrow-trait.rs
src/test/compile-fail/dst-bad-coercions.rs
src/test/compile-fail/issue-13058.rs

index 6b468ff96620d25bf0b667d9823d4ba70b5dc964..7c5a4e0c3c6f644467c7117cbdc8da80dcfd1d61 100644 (file)
@@ -14,6 +14,5 @@ fn main() {
     let _: &[i32] = [0];
     //~^ ERROR mismatched types
     //~| expected type `&[i32]`
-    //~| found type `[{integer}; 1]`
     //~| expected &[i32], found array of 1 elements
 }
index e5afccb9cf3943080ae12feb22ce6675f4ccced6..ee67a30fa1c370af731795d653dd0ac913eab1f7 100644 (file)
@@ -20,4 +20,6 @@ pub fn main() {
     let _y: &Trait = x; //~  ERROR mismatched types
                         //~| expected type `&Trait`
                         //~| found type `std::boxed::Box<Trait>`
+                        //~| expected &Trait, found box
+                        //~| ERROR the trait bound `Box<Trait>: Trait` is not satisfied
 }
index 883c16b0895816076c8326de14e232ea9154ca74..ff2e2d619a5ec7017a094a3929743355d8578295 100644 (file)
@@ -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 the trait bound `*const S: T` is not satisfied
 
     // 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 the trait bound `*mut S: T` is not satisfied
 
     // Test that we cannot convert an immutable ptr to a mutable one using *-ptrs
     let x: &mut T = &S; //~ ERROR mismatched types
index 408c6d411de9030efb4b80371f4ee13cd1e5a2de..ed1634441498be40d5a05f98c51f2c5b8019a02c 100644 (file)
@@ -35,4 +35,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)`
 }