这给了我一个错误:
mod foo {
pub enum T {
Foo,
}
}
mod bar {
pub type T = ::foo::T;
}
fn main() {
let _ = bar::T::Foo; // error: no associated item named `Foo` found for type `foo::T` in the current scope
}
Run Code Online (Sandbox Code Playgroud)
这样做的正确方法是什么?
| 归档时间: |
|
| 查看次数: |
68 次 |
| 最近记录: |