/src/test/run-pass/size-and-align.rs
Rust | 17 lines | 11 code | 5 blank | 1 comment | 0 complexity | 0eda8f2b575704f057d2933aca6dc1cf MD5 | raw file
1 2 3 4// -*- rust -*- 5enum clam<T> { a(T, int), b, } 6 7fn uhoh<T>(v: ~[clam<T>]) { 8 match v[1] { 9 a::<T>(t, u) => { debug!{"incorrect"}; log(debug, u); fail; } 10 b::<T> => { debug!{"correct"}; } 11 } 12} 13 14fn main() { 15 let v: ~[clam<int>] = ~[b::<int>, b::<int>, a::<int>(42, 17)]; 16 uhoh::<int>(v); 17}