我有一些 Rust 代码,只是有另一个 modu
// main.rs
mod foo;
fn main() {
foo::hello();
}
// foo.rs
pub fn hello() {
println!("Hello, world!");
}
Run Code Online (Sandbox Code Playgroud)
但 vim ale https://github.com/dense-analysis/ale不断声称:
`main` function not found in crate `rust_out`: consider adding a `main` function at the crate level
Run Code Online (Sandbox Code Playgroud)
这是配置
...
Plug 'rust-lang/rust.vim'
...
let g:ale_linters = {
\ 'rust': ['rls', 'rustc', 'cargo'],
\ }
...
Run Code Online (Sandbox Code Playgroud)
cargo build
运行正常,啤酒出了问题!?
归档时间: |
|
查看次数: |
1683 次 |
最近记录: |