diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-11-08 22:55:58 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2017-04-21 12:28:24 +0200 |
| commit | 8fe3a9a8f123fa759d35000bfbfb623167a76409 (patch) | |
| tree | 08db4a5646416e1c21e366a17b7f554ff4fd954f | |
| parent | d360091e799b14a81ced54a67bc67ae0b0bc3afe (diff) | |
| download | rust-8fe3a9a8f123fa759d35000bfbfb623167a76409.tar.gz rust-8fe3a9a8f123fa759d35000bfbfb623167a76409.zip | |
Update tests
| -rw-r--r-- | src/test/compile-fail/coercion-slice.rs | 1 | ||||
| -rw-r--r-- | src/test/compile-fail/cross-borrow-trait.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/dst-bad-coercions.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-13058.rs | 1 |
4 files changed, 5 insertions, 1 deletions
diff --git a/src/test/compile-fail/coercion-slice.rs b/src/test/compile-fail/coercion-slice.rs index 6b468ff9662..7c5a4e0c3c6 100644 --- a/src/test/compile-fail/coercion-slice.rs +++ b/src/test/compile-fail/coercion-slice.rs @@ -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 } diff --git a/src/test/compile-fail/cross-borrow-trait.rs b/src/test/compile-fail/cross-borrow-trait.rs index e5afccb9cf3..ee67a30fa1c 100644 --- a/src/test/compile-fail/cross-borrow-trait.rs +++ b/src/test/compile-fail/cross-borrow-trait.rs @@ -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 } diff --git a/src/test/compile-fail/dst-bad-coercions.rs b/src/test/compile-fail/dst-bad-coercions.rs index 883c16b0895..ff2e2d619a5 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 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 diff --git a/src/test/compile-fail/issue-13058.rs b/src/test/compile-fail/issue-13058.rs index 408c6d411de..ed163444149 100644 --- a/src/test/compile-fail/issue-13058.rs +++ b/src/test/compile-fail/issue-13058.rs @@ -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)` } |
