summary refs log tree commit diff
path: root/src/test/compile-fail/issue-2330.rs
blob: aee379cac708e3e9dd73ec4e741a84fe9b5e0eb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
enum chan { }

trait channel<T> {
    fn send(v: T);
}

// `chan` is not a trait, it's an enum
impl int: chan { //~ ERROR can only implement trait types
    fn send(v: int) { fail }
}

fn main() {
}