use const_type::
{
Const,
};
Const!
{
pub Bar: u16
{
A = 1,
B = 2,
C = 3,
D = Bar::A.0,
}
}
impl Into < usize > for Bar
{
fn into
(
self
)
-> usize
{
self.0 as usize
}
}
#[test]
fn main () -> Result<(), &'static str>
{
let foo: Bar = Bar::C;
Ok ( ( ) )
}