0
我寫了一個生鏽的示例程序。 代碼是這樣的:「預計箱子指令」有關生鏽的錯誤
use std;
import std::io;
fn main() {
io::println("hello world");
}
我嘗試編譯它,但rustc編譯告訴我一些錯誤信息。
hello.rc:4:0: 4:2 error: expected crate directive
hello.rc:4 fn main() {
^~
我rustc版本是
macmatoMacBook-Air:test kula$ rustc -v
rustc 0.1.1 (a0f0a70 2012-03-10 00:35:02 -0800)
host: x86_64-apple-darwin
和我的操作系統是Mac OSX版10.7
人知道發生了什麼事?我認爲我的防鏽代碼沒有問題。