test: Modify error messages in some compile-fail tests in an attempt to unbreak the tree
This commit is contained in:
parent
87f4c15311
commit
6e31183614
@ -9,5 +9,5 @@ fn main() {
|
||||
}
|
||||
|
||||
f(g);
|
||||
//~^ ERROR mismatched types: expected `extern fn(extern fn(extern fn()))`
|
||||
//~^ ERROR mismatched types: expected `fn(fn(fn&()))`
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ fn coerce(b: fn()) -> extern fn() {
|
||||
g: fn()) -> extern fn() { return f(g); }
|
||||
fn fn_id(f: extern fn()) -> extern fn() { return f }
|
||||
return lol(fn_id, b);
|
||||
//~^ ERROR mismatched types: expected `extern fn(fn&()) -> extern fn()`
|
||||
//~^ ERROR mismatched types: expected `fn(fn&()) -> fn()`
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// error-pattern:expected `fn&()` but found `*u8`
|
||||
// error-pattern:expected `fn&<R0>()` but found `*u8`
|
||||
extern fn f() {
|
||||
}
|
||||
|
||||
|
@ -2,5 +2,5 @@ fn main() {
|
||||
fn f() { }
|
||||
fn g(i: int) { }
|
||||
let x = f == g;
|
||||
//~^ ERROR expected `extern fn()` but found `extern fn(int)`
|
||||
//~^ ERROR expected `fn()` but found `fn(int)`
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
fn main() -> char {
|
||||
//~^ ERROR Wrong type in main function: found `extern fn() -> char`
|
||||
//~^ ERROR Wrong type in main function: found `fn() -> char`
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
fn main(foo: {x: int, y: int}) {
|
||||
//~^ ERROR Wrong type in main function: found `extern fn({x: int,y: int})`
|
||||
//~^ ERROR Wrong type in main function: found `fn({x: int,y: int})`
|
||||
}
|
||||
|
@ -4,6 +4,6 @@ fn foo(f: fn()) { f() }
|
||||
|
||||
fn main() {
|
||||
~"" || 42; //~ ERROR binary operation || cannot be applied to type `~str`
|
||||
foo || {}; //~ ERROR binary operation || cannot be applied to type `extern fn(fn&())`
|
||||
foo || {}; //~ ERROR binary operation || cannot be applied to type `fn(fn&())`
|
||||
//~^ NOTE did you forget the 'do' keyword for the call?
|
||||
}
|
||||
|
@ -23,14 +23,14 @@ fn assign_to_pure2(x: pure fn@(), y: fn@(), z: unsafe fn@()) {
|
||||
let b: pure fn() = y; //~ ERROR expected pure fn but found impure fn
|
||||
let c: pure fn() = z; //~ ERROR expected pure fn but found unsafe fn
|
||||
|
||||
let a: pure fn~() = x; //~ ERROR closure protocol mismatch (fn~ vs fn@)
|
||||
let b: pure fn~() = y; //~ ERROR closure protocol mismatch (fn~ vs fn@)
|
||||
let c: pure fn~() = z; //~ ERROR closure protocol mismatch (fn~ vs fn@)
|
||||
let a: pure fn~() = x; //~ ERROR fn storage differs: expected ~ but found @
|
||||
let b: pure fn~() = y; //~ ERROR fn storage differs: expected ~ but found @
|
||||
let c: pure fn~() = z; //~ ERROR fn storage differs: expected ~ but found @
|
||||
|
||||
let a: unsafe fn~() = x; //~ ERROR closure protocol mismatch (fn~ vs fn@)
|
||||
let b: unsafe fn~() = y; //~ ERROR closure protocol mismatch (fn~ vs fn@)
|
||||
let c: unsafe fn~() = z; //~ ERROR closure protocol mismatch (fn~ vs fn@)
|
||||
let a: unsafe fn~() = x; //~ ERROR fn storage differs: expected ~ but found @
|
||||
let b: unsafe fn~() = y; //~ ERROR fn storage differs: expected ~ but found @
|
||||
let c: unsafe fn~() = z; //~ ERROR fn storage differs: expected ~ but found @
|
||||
}
|
||||
|
||||
fn main() {
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user