Skip to content

Commit 98d5090

Browse files
committed
Make cfail test error messages more precise
Closes rust-lang#3192
1 parent 5818f13 commit 98d5090

5 files changed

+5
-5
lines changed

src/test/compile-fail/struct-no-fields-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

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

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

1818
fn main() {}

src/test/compile-fail/struct-no-fields-3.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

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

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

1818
fn main() {}

src/test/compile-fail/struct-no-fields-4.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

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

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

1818
fn main() {}

src/test/compile-fail/struct-no-fields-5.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

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

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

1818
fn main() {}

src/test/compile-fail/struct-no-fields.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

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

1414
fn main() {}

0 commit comments

Comments
 (0)