test: Fix error messages in compile-fail tests. rs=rustbot
This commit is contained in:
parent
ad02510258
commit
caf68038dd
5 changed files with 7 additions and 12 deletions
|
|
@ -1,5 +1,5 @@
|
|||
enum hello = int;
|
||||
|
||||
fn main() {
|
||||
let hello = 0; //~ERROR declaration of `hello` shadows an enum that's in
|
||||
}
|
||||
let hello = 0; //~ERROR declaration of `hello` shadows
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// error-pattern: type cat cannot be dereferenced
|
||||
// error-pattern: can only dereference structs
|
||||
struct cat {
|
||||
x: ()
|
||||
}
|
||||
|
|
@ -6,4 +6,4 @@ struct cat {
|
|||
fn main() {
|
||||
let kitty : cat = cat { x: () };
|
||||
log (error, *kitty);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// error-pattern: type cat cannot be dereferenced
|
||||
// error-pattern: can only dereference structs
|
||||
struct cat {
|
||||
foo: ()
|
||||
}
|
||||
|
|
@ -6,4 +6,4 @@ struct cat {
|
|||
fn main() {
|
||||
let nyan = cat { foo: () };
|
||||
log (error, *nyan);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
struct c { //~ ERROR a struct must have at least one field
|
||||
}
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
enum foo = uint;
|
||||
|
||||
fn main() {
|
||||
let (foo, _) = (2, 3); //~ ERROR declaration of `foo` shadows an enum that's in scope
|
||||
let (foo, _) = (2, 3); //~ ERROR declaration of `foo` shadows
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue