diff options
| author | bors <bors@rust-lang.org> | 2024-03-22 15:22:49 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-22 15:22:49 +0000 |
| commit | 2fae357cb87d6ec184a34892394d4e737ecd6030 (patch) | |
| tree | 2e95d58c16c36d9159307f386ce1912c94bc4fff /src/tools/rustfmt/tests/source | |
| parent | f61f45f2336ad473ca152252f81e447ae19e0553 (diff) | |
| parent | ee57d2b318fc17080740172896269cd9865a17f4 (diff) | |
| download | rust-2fae357cb87d6ec184a34892394d4e737ecd6030.tar.gz rust-2fae357cb87d6ec184a34892394d4e737ecd6030.zip | |
Auto merge of #3394 - RalfJung:rustup, r=RalfJung
Rustup
Diffstat (limited to 'src/tools/rustfmt/tests/source')
| -rw-r--r-- | src/tools/rustfmt/tests/source/postfix-match/pf-match.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/source/postfix-match/pf-match.rs b/src/tools/rustfmt/tests/source/postfix-match/pf-match.rs new file mode 100644 index 00000000000..b2366723631 --- /dev/null +++ b/src/tools/rustfmt/tests/source/postfix-match/pf-match.rs @@ -0,0 +1,20 @@ +#![feature(postfix_match)] + +fn main() { + let val = Some(42); + + val.match { + Some(_) => 2, + _ => 1 + }; + + Some(2).match { + Some(_) => true, + None => false + }.match { + false => "ferris is cute", + true => "I turn cats in to petted cats", + }.match { + _ => (), + } +} \ No newline at end of file |
