2019-11-04 00:00:00 +00:00
|
|
|
// check-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(dead_code)]
|
2018-08-31 15:02:01 +02:00
|
|
|
#![allow(non_upper_case_globals)]
|
|
|
|
|
2015-10-24 17:29:13 -04:00
|
|
|
|
|
|
|
trait HasNumber<T> {
|
|
|
|
const Number: usize;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum One {}
|
|
|
|
enum Two {}
|
|
|
|
|
|
|
|
enum Foo {}
|
|
|
|
|
|
|
|
impl<T> HasNumber<T> for One {
|
|
|
|
const Number: usize = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<T> HasNumber<T> for Two {
|
|
|
|
const Number: usize = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|