提交 dac8883a 编写于 作者: N Niko Matsakis 提交者: Guillaume Gomez

fix some broken tests

上级 88e9430d
......@@ -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
}
......@@ -22,5 +22,4 @@ pub fn main() {
//~| expected type `&Trait`
//~| found type `Box<Trait>`
//~| expected &Trait, found box
//~^^^^ ERROR E0277
}
......@@ -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
......
......@@ -36,5 +36,4 @@ 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)`
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册