diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2016-02-12 14:59:13 +1300 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2016-02-12 14:59:13 +1300 |
| commit | d86cfb357aef2d70e67e616f60ca587bd12def62 (patch) | |
| tree | 5efd7a7070a2252eef5b79d015334b6a61193c46 /tests/source | |
| parent | c906b656e61d0413cd411dcb6dbe8a4222bf3ab3 (diff) | |
Format all patterns (well, except macros)
Fixes #18 Fixes #672
Diffstat (limited to 'tests/source')
| -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 index 930ffe2258f..75f65806167 100644 --- a/tests/source/pattern.rs +++ b/tests/source/pattern.rs @@ -11,6 +11,20 @@ fn main() { let Some ( ref xyz /* comment! */) = opt; if let None = opt2 { panic!("oh noes"); } + + let foo@bar (f) = 42; + let a::foo ( ..) = 42; + let [ ] = 42; + let [a.., b,c ] = 42; + let [ a,b,c.. ] = 42; + let [a, b, c, d..,e,f, g] = 42; + let foo { } = 42; + let foo {..} = 42; + let foo { x, y: ref foo, .. } = 42; + let foo { x, yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy: ref foo, .. } = 42; + let foo { x, yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy: ref foo, } = 42; + let foo { x, yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy: ref foo, .. }; + let foo { x, yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy: ref foo, }; } impl<'a,'b> ResolveGeneratedContentFragmentMutator<'a,'b> { |
