diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/parser/match-arm-without-braces.rs | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/parser/match-arm-without-braces.rs')
-rw-r--r-- | src/test/ui/parser/match-arm-without-braces.rs | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/src/test/ui/parser/match-arm-without-braces.rs b/src/test/ui/parser/match-arm-without-braces.rs deleted file mode 100644 index bba38fd0f..000000000 --- a/src/test/ui/parser/match-arm-without-braces.rs +++ /dev/null @@ -1,87 +0,0 @@ -struct S; - -impl S { - fn get<K, V: Default>(_: K) -> Option<V> { - Default::default() - } -} - -enum Val { - Foo, - Bar, -} - -impl Default for Val { - fn default() -> Self { - Val::Foo - } -} - -fn main() { - match S::get(1) { - Some(Val::Foo) => {} - _ => {} - } - match S::get(2) { - Some(Val::Foo) => 3; //~ ERROR `match` arm body without braces - _ => 4, - } - match S::get(5) { - Some(Val::Foo) => - 7; //~ ERROR `match` arm body without braces - 8; - _ => 9, - } - match S::get(10) { - Some(Val::Foo) => - 11; //~ ERROR `match` arm body without braces - 12; - _ => (), - } - match S::get(13) { - None => {} - Some(Val::Foo) => - 14; //~ ERROR `match` arm body without braces - 15; - } - match S::get(16) { - Some(Val::Foo) => 17 //~ ERROR expected `,` following `match` arm - _ => 18, - }; - match S::get(19) { - Some(Val::Foo) => - 20; //~ ERROR `match` arm body without braces - 21 - _ => 22, - } - match S::get(23) { - Some(Val::Foo) => - 24; //~ ERROR `match` arm body without braces - 25 - _ => (), - } - match S::get(26) { - None => {} - Some(Val::Foo) => - 27; //~ ERROR `match` arm body without braces - 28 - } - match S::get(29) { - Some(Val::Foo) => - 30; //~ ERROR expected one of - 31, - _ => 32, - } - match S::get(33) { - Some(Val::Foo) => - 34; //~ ERROR expected one of - 35, - _ => (), - } - match S::get(36) { - None => {} - Some(Val::Foo) => - 37; //~ ERROR expected one of - 38, - } -} |