test: Fix error messages in compile-fail tests. rs=rustbot

This commit is contained in:
Patrick Walton 2012-11-02 10:43:15 -07:00
parent ad02510258
commit caf68038dd
5 changed files with 7 additions and 12 deletions

View file

@ -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
}

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -1,5 +0,0 @@
struct c { //~ ERROR a struct must have at least one field
}
fn main() {
}

View file

@ -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
}