diff options
| author | Marcus Klaas <mail@marcusklaas.nl> | 2015-10-17 15:56:53 +0200 |
|---|---|---|
| committer | Marcus Klaas <mail@marcusklaas.nl> | 2015-10-19 20:15:36 +0200 |
| commit | ca023ba9b702ec9d453e917ffac54263ab4ef965 (patch) | |
| tree | a260e038717129d88e1d3a008d9025bdc15fd11b /tests/source/pattern.rs | |
| parent | 8a9bbd9d7cef43b0977dcce7f4f89886a7d288d7 (diff) | |
Format some patterns
Diffstat (limited to 'tests/source/pattern.rs')
| -rw-r--r-- | tests/source/pattern.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/source/pattern.rs b/tests/source/pattern.rs new file mode 100644 index 00000000000..4192d521085 --- /dev/null +++ b/tests/source/pattern.rs @@ -0,0 +1,14 @@ +fn main() { + let z = match x { + "pat1" => 1, + ( ref x, ref mut y /*comment*/) => 2, + }; + + if let < T as Trait > :: CONST = ident { + do_smth(); + } + + let Some ( ref xyz /* comment! */) = opt; + + if let None = opt2 { panic!("oh noes"); } +} |
