From 0f9285d72b328e633649b3dbbdb5eb952a54b71c Mon Sep 17 00:00:00 2001 From: Yuke Peng Date: Tue, 13 Aug 2024 20:19:00 +0800 Subject: [PATCH] Adjust cargo check script in rust analyzer --- .vscode/settings.json | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 13303c1c..fbdd034b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,15 @@ { - "rust-analyzer.check.allTargets": false, "rust-analyzer.cargo.target": "x86_64-unknown-none", - "rust-analyzer.check.extraArgs": [ + "rust-analyzer.check.extraEnv": { + "RUSTFLAGS": "--check-cfg cfg(ktest) --cfg ktest" + }, + "rust-analyzer.check.overrideCommand": [ + "cargo", + "check", + "--quiet", + "--message-format=json", + "--manifest-path", + "kernel/Cargo.toml", "--target", "x86_64-unknown-none", "-Zbuild-std=core,alloc,compiler_builtins",