Syntax rust中意外标记“(';附近出现语法错误

Syntax rust中意外标记“(';附近出现语法错误,syntax,rust,Syntax,Rust,我在rust.helloworld中输入了我的第一个代码。但是当我试图运行它时,我遇到了一个错误 fn main() { println!("Hello world"); } 我尝试使用“./hellworld.rs”运行 但它表明, syntax error near unexpected token `(' `fn main() {' 我正在使用powershell。但使用了错误的命令/helloworld.rs 相反,我尝试了/helloworld和/helloworld.ex

我在rust.helloworld中输入了我的第一个代码。但是当我试图运行它时,我遇到了一个错误

fn main() {
    println!("Hello world");
}
我尝试使用“./hellworld.rs”运行 但它表明,

syntax error near unexpected token `('
`fn main() {'

我正在使用powershell。但使用了错误的命令
/helloworld.rs
相反,我尝试了
/helloworld
/helloworld.exe
。这两种方法都有效