2018-12-16 21:21:47 -06:00
|
|
|
enum Chan { }
|
2012-05-03 12:10:12 -05:00
|
|
|
|
2018-12-16 21:21:47 -06:00
|
|
|
trait Channel<T> {
|
2013-03-12 21:32:14 -05:00
|
|
|
fn send(&self, v: T);
|
2012-05-03 12:10:12 -05:00
|
|
|
}
|
|
|
|
|
2018-12-16 21:21:47 -06:00
|
|
|
// `Chan` is not a trait, it's an enum
|
|
|
|
impl Chan for isize { //~ ERROR expected trait, found enum `Chan`
|
2015-01-08 04:54:35 -06:00
|
|
|
fn send(&self, v: isize) { panic!() }
|
2012-05-03 12:10:12 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|