File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/tools/rust-analyzer/crates/rust-analyzer/src/handlers Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -836,13 +836,14 @@ pub(crate) fn handle_runnables(
836
836
let config = snap. config . runnables ( ) ;
837
837
match cargo_spec {
838
838
Some ( spec) => {
839
+ let is_crate_no_std = snap. analysis . is_crate_no_std ( spec. crate_id ) ?;
839
840
for cmd in [ "check" , "run" , "test" ] {
840
841
if cmd == "run" && spec. target_kind != TargetKind :: Bin {
841
842
continue ;
842
843
}
843
844
let mut cargo_args =
844
845
vec ! [ cmd. to_owned( ) , "--package" . to_owned( ) , spec. package. clone( ) ] ;
845
- let all_targets = cmd != "run" && !snap . analysis . is_crate_no_std ( spec . crate_id ) ? ;
846
+ let all_targets = cmd != "run" && !is_crate_no_std;
846
847
if all_targets {
847
848
cargo_args. push ( "--all-targets" . to_owned ( ) ) ;
848
849
}
You can’t perform that action at this time.
0 commit comments