about summary refs log tree commit diff
path: root/tests/ui/pattern/size-and-align.rs
blob: f436ea481041eae5193a22e1a544c0c190be3fd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//@ run-pass

#![allow(non_camel_case_types)]
enum clam<T> { a(T, isize), b, }

fn uhoh<T>(v: Vec<clam<T>> ) {
    match v[1] {
      clam::a::<T>(ref _t, ref u) => {
          println!("incorrect");
          println!("{}", u);
          panic!();
      }
      clam::b::<T> => { println!("correct"); }
    }
}

pub fn main() {
    let v: Vec<clam<isize>> = vec![clam::b::<isize>, clam::b::<isize>, clam::a::<isize>(42, 17)];
    uhoh::<isize>(v);
}