我正在做一个 rust 项目,你必须选择一些特性来决定线性编程模块来编译项目。通常,我可以运行检查,cargo check --features lp_coincbc,blas_openblas-system
一切正常。然而,Rust Analyzer VSCode Extension 给了我错误(compile_error!
项目中内置的 s),即使我在我的 VScodesettings.json
文件中设置了这个。
# ~/.config/Code/User/settings.json
{
...
"rust-analyzer.cargo.features": [
"lp_coincbc",
"blas_openblas-system"
],
...
}
我进一步检查rust-analyzer.checkOnSave.features
了它应该默认为rust-analyzer.cargo.features
,所以我在这里真的很困惑。任何帮助,将不胜感激。
编辑:包括语言服务器跟踪配置(已删除字符限制)。
编辑 2:使用RA_LOG="flycheck=info"
(因字符限制而删除)。
编辑 3:Rust Analyzer 语言服务器面板:
[INFO flycheck] restart flycheck "cargo" "check" "--workspace" "--message-format=json" "--manifest-path" "/home/ihowell/Projects/rl/nnv-rs/Cargo.toml" "--all-targets" "--features" "lp_coincbc blas_openblas-system"
编辑4:错误副本mod.rs
[{
"resource": "/home/ihowell/Projects/rl/nnv-rs/src/lib.rs",
"owner": "rust",
"severity": 8,
"message": "error: Must enable one of \"blas_{{intel_mkl,openblas-system}}\"",
"startLineNumber": 43,
"startColumn": 9,
"endLineNumber": 43,
"endColumn": 85
}]