diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-06-13 19:09:12 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-06-23 15:39:29 -0700 |
| commit | 654d6444feafaa7bae17057d8b98823c7556ea14 (patch) | |
| tree | 423bbab4e54f324b269942c6af7b1c01a1eeaa36 /src/test/compile-fail/struct-no-fields-5.rs | |
| parent | 575710f6cee318e2806b4563eb2887c1f03aaa18 (diff) | |
| download | rust-654d6444feafaa7bae17057d8b98823c7556ea14.tar.gz rust-654d6444feafaa7bae17057d8b98823c7556ea14.zip | |
libsyntax: Disallow struct literals after `if`, `while`, `match`, and
`for...in`. Closes #14803. If you used a structure literal after one of these keywords, surround it in parentheses. [breaking-change]
Diffstat (limited to 'src/test/compile-fail/struct-no-fields-5.rs')
| -rw-r--r-- | src/test/compile-fail/struct-no-fields-5.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/compile-fail/struct-no-fields-5.rs b/src/test/compile-fail/struct-no-fields-5.rs index bd196e881aa..940fa9c7f27 100644 --- a/src/test/compile-fail/struct-no-fields-5.rs +++ b/src/test/compile-fail/struct-no-fields-5.rs @@ -12,7 +12,7 @@ struct Foo; fn i5() { let _end_of_block = { Foo { } }; - //~^ ERROR: unit-like struct construction is written with no trailing `{ }` + //~^ ERROR: structure literal must either have at least one field } fn main() {} |
