【发布时间】:2015-11-08 23:12:29
【问题描述】:
有没有办法让下面的代码工作?也就是说,以类型别名导出枚举,并允许以新名称访问变体?
enum One { A, B, C }
type Two = One;
fn main() {
// error: no associated item named `B` found for type `One` in the current scope
let b = Two::B;
}
【问题讨论】:
标签: rust