Skip to content

Commit 8fe3a9a

Browse files
Update tests
1 parent d360091 commit 8fe3a9a

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

src/test/compile-fail/coercion-slice.rs

-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ fn main() {
1414
let _: &[i32] = [0];
1515
//~^ ERROR mismatched types
1616
//~| expected type `&[i32]`
17-
//~| found type `[{integer}; 1]`
1817
//~| expected &[i32], found array of 1 elements
1918
}

src/test/compile-fail/cross-borrow-trait.rs

+2
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ pub fn main() {
2020
let _y: &Trait = x; //~ ERROR mismatched types
2121
//~| expected type `&Trait`
2222
//~| found type `std::boxed::Box<Trait>`
23+
//~| expected &Trait, found box
24+
//~| ERROR the trait bound `Box<Trait>: Trait` is not satisfied
2325
}

src/test/compile-fail/dst-bad-coercions.rs

+2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ pub fn main() {
2323
let x: *const S = &S;
2424
let y: &S = x; //~ ERROR mismatched types
2525
let y: &T = x; //~ ERROR mismatched types
26+
//~^ ERROR the trait bound `*const S: T` is not satisfied
2627

2728
// Test that we cannot convert from *-ptr to &S and &T (mut version)
2829
let x: *mut S = &mut S;
2930
let y: &S = x; //~ ERROR mismatched types
3031
let y: &T = x; //~ ERROR mismatched types
32+
//~^ ERROR the trait bound `*mut S: T` is not satisfied
3133

3234
// Test that we cannot convert an immutable ptr to a mutable one using *-ptrs
3335
let x: &mut T = &S; //~ ERROR mismatched types

src/test/compile-fail/issue-13058.rs

+1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ fn check<'r, I: Iterator<Item=usize>, T: Itble<'r, usize, I>>(cont: &T) -> bool
3535
fn main() {
3636
check((3, 5));
3737
//~^ ERROR mismatched types
38+
//~| HELP try with `&(3, 5)`
3839
}

0 commit comments

Comments
 (0)