我开始了“rubyists 生锈”教程,这段代码让我大吃一惊:
extern mod std;
#[test]
fn this_tests_code() {
println("")
}
fn main() {
}
尝试编译它给了我:
> rustc testing.rs
testing.rs:1:0: 1:0 error: multiple matching crates for `core`
testing.rs:1 extern mod std;
^
note: candidates:
note: path: /usr/local/lib/rustc/x86_64-apple-darwin/lib/libcore-c3ca5d77d81b46c1-0.5.dylib
note: meta: name = "core"
note: meta: vers = "0.5"
note: meta: uuid = "c70c24a7-5551-4f73-8e37-380b11d80be8"
note: meta: url = "https://github.com/mozilla/rust/tree/master/src/libcore"
note: path: /usr/local/lib/rustc/x86_64-apple-darwin/lib/libcore-c3ca5d77d81b46c1-0.6.dylib
note: meta: name = "core"
note: meta: vers = "0.6"
note: meta: uuid = "c70c24a7-5551-4f73-8e37-380b11d80be8"
note: meta: url = "https://github.com/mozilla/rust/tree/master/src/libcore"
error: aborting due to previous error
我正在使用 rustc 0.6。我不确定它应该做什么,所以任何人都可以给我一些见解吗?谢谢!