about summary refs log tree commit diff
path: root/tests/ui/generics/generic-tag-match.rs
blob: 378b51df287b3454fe2750a5e27de4b781ee695c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ run-pass
#![allow(unused_assignments)]
#![allow(non_camel_case_types)]

enum foo<T> { arm(T), }

fn altfoo<T>(f: foo<T>) {
    let mut hit = false;
    match f { foo::arm::<T>(_x) => { println!("in arm"); hit = true; } }
    assert!(hit);
}

pub fn main() { altfoo::<isize>(foo::arm::<isize>(10)); }