2020-10-13 23:42:59 -05:00
|
|
|
fn main() {
|
2020-11-09 11:45:11 -06:00
|
|
|
[1; <Multiply<Five, Five>>::VAL];
|
2020-10-13 23:42:59 -05:00
|
|
|
}
|
|
|
|
trait TypeVal<T> {
|
2020-11-09 11:45:11 -06:00
|
|
|
const VAL: T;
|
2020-10-13 23:42:59 -05:00
|
|
|
}
|
|
|
|
struct Five;
|
|
|
|
struct Multiply<N, M> {
|
|
|
|
_n: PhantomData, //~ ERROR cannot find type `PhantomData` in this scope
|
|
|
|
}
|
|
|
|
impl<N, M> TypeVal<usize> for Multiply<N, M> where N: TypeVal<VAL> {}
|
|
|
|
//~^ ERROR cannot find type `VAL` in this scope
|
2021-11-26 09:14:16 -06:00
|
|
|
//~| ERROR not all trait items implemented, missing: `VAL`
|