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/debuginfo | |
| 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/debuginfo')
| -rw-r--r-- | src/test/debuginfo/lexical-scope-in-match.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/debuginfo/lexical-scope-in-match.rs b/src/test/debuginfo/lexical-scope-in-match.rs index 5f13c780ba8..b347afbbbcd 100644 --- a/src/test/debuginfo/lexical-scope-in-match.rs +++ b/src/test/debuginfo/lexical-scope-in-match.rs @@ -105,7 +105,7 @@ fn main() { _ => {} } - match Struct { x: 237, y: 238 } { + match (Struct { x: 237, y: 238 }) { Struct { x: shadowed, y: local_to_arm } => { zzz(); @@ -113,7 +113,7 @@ fn main() { } } - match Struct { x: 239, y: 240 } { + match (Struct { x: 239, y: 240 }) { // ignored field Struct { x: shadowed, .. } => { @@ -122,7 +122,7 @@ fn main() { } } - match Struct { x: 241, y: 242 } { + match (Struct { x: 241, y: 242 }) { // with literal Struct { x: shadowed, y: 242 } => { |
