Skip to content

Commit

Permalink
Make cfail test error messages more precise
Browse files Browse the repository at this point in the history
Closes #3192
  • Loading branch information
alexcrichton committed Feb 5, 2014
1 parent 8a1dda9 commit 03c28b4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/test/compile-fail/struct-no-fields-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// error-pattern: Unit-like struct construction is written with no trailing `{ }`
struct Foo;

fn f2() {
let _end_stmt = Foo { };
//~^ ERROR: Unit-like struct construction is written with no trailing `{ }`
}

fn main() {}
2 changes: 1 addition & 1 deletion src/test/compile-fail/struct-no-fields-3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// error-pattern: Unit-like struct construction is written with no trailing `{ }`
struct Foo;

fn g3() {
let _mid_tuple = (Foo { }, 2);
//~^ ERROR: Unit-like struct construction is written with no trailing `{ }`
}

fn main() {}
2 changes: 1 addition & 1 deletion src/test/compile-fail/struct-no-fields-4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// error-pattern: Unit-like struct construction is written with no trailing `{ }`
struct Foo;

fn h4() {
let _end_of_tuple = (3, Foo { });
//~^ ERROR: Unit-like struct construction is written with no trailing `{ }`
}

fn main() {}
2 changes: 1 addition & 1 deletion src/test/compile-fail/struct-no-fields-5.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// error-pattern: Unit-like struct construction is written with no trailing `{ }`
struct Foo;

fn i5() {
let _end_of_block = { Foo { } };
//~^ ERROR: Unit-like struct construction is written with no trailing `{ }`
}

fn main() {}
2 changes: 1 addition & 1 deletion src/test/compile-fail/struct-no-fields.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// error-pattern: Unit-like struct definition should be written as `struct Foo;`
struct Foo {}
//~^ ERROR: Unit-like struct definition should be written as `struct Foo;`

fn main() {}

0 comments on commit 03c28b4

Please sign in to comment.