]> git.lizzy.rs Git - rust.git/blob - tests/source/pattern.rs
Merge pull request #798 from kamalmarhubi/default-no-todo-warnings
[rust.git] / tests / source / pattern.rs
1 fn main() {
2     let z = match x {
3         "pat1" => 1,
4         ( ref  x, ref  mut  y /*comment*/) => 2,
5     };
6
7     if let <  T as  Trait   > :: CONST = ident {
8         do_smth();
9     }
10
11     let Some ( ref   xyz  /*   comment!   */) = opt;
12
13     if let  None  =   opt2 { panic!("oh noes"); }
14
15     let foo@bar (f) = 42;
16     let a::foo ( ..) = 42;
17     let [ ] = 42;
18     let [a..,     b,c ] = 42;
19     let [ a,b,c.. ] = 42;
20     let [a,    b, c, d..,e,f,     g] = 42;
21     let foo {   } = 42;
22     let foo {..} = 42;
23     let foo { x, y: ref foo,     .. } = 42;
24     let foo { x, yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy: ref foo,     .. } = 42;
25     let foo { x,       yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy: ref foo,      } = 42;
26     let foo { x, yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy: ref foo,     .. };
27     let foo { x,       yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy: ref foo,      };
28 }
29
30 impl<'a,'b> ResolveGeneratedContentFragmentMutator<'a,'b> {
31     fn mutate_fragment(&mut self, fragment: &mut Fragment) {
32         match **info {
33             GeneratedContentInfo::ContentItem(
34                 ContentItem::Counter(
35                     ref counter_name,
36                     counter_style
37                 )
38             ) => {}}}
39 }