From dac8883a94f9a60d115cf9daecc22361dcaed4f4 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Thu, 1 Dec 2016 15:51:40 -0500 Subject: [PATCH] fix some broken tests --- src/test/compile-fail/coercion-slice.rs | 2 +- src/test/compile-fail/cross-borrow-trait.rs | 1 - src/test/compile-fail/dst-bad-coercions.rs | 2 -- src/test/compile-fail/issue-13058.rs | 1 - 4 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/test/compile-fail/coercion-slice.rs b/src/test/compile-fail/coercion-slice.rs index f5090088399..6b468ff9662 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 `[i32; 1]` + //~| 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 975bc1300aa..672ff464718 100644 --- a/src/test/compile-fail/cross-borrow-trait.rs +++ b/src/test/compile-fail/cross-borrow-trait.rs @@ -22,5 +22,4 @@ pub fn main() { //~| expected type `&Trait` //~| found type `Box` //~| 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 728b016b30f..883c16b0895 100644 --- a/src/test/compile-fail/dst-bad-coercions.rs +++ b/src/test/compile-fail/dst-bad-coercions.rs @@ -23,13 +23,11 @@ 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 df6675510ff..de578257e46 100644 --- a/src/test/compile-fail/issue-13058.rs +++ b/src/test/compile-fail/issue-13058.rs @@ -36,5 +36,4 @@ fn check<'r, I: Iterator, T: Itble<'r, usize, I>>(cont: &T) -> bool fn main() { check((3, 5)); //~^ ERROR mismatched types -//~| HELP try with `&(3, 5)` }