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(
836836 let config = snap. config . runnables ( ) ;
837837 match cargo_spec {
838838 Some ( spec) => {
839+ let is_crate_no_std = snap. analysis . is_crate_no_std ( spec. crate_id ) ?;
839840 for cmd in [ "check" , "run" , "test" ] {
840841 if cmd == "run" && spec. target_kind != TargetKind :: Bin {
841842 continue ;
842843 }
843844 let mut cargo_args =
844845 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;
846847 if all_targets {
847848 cargo_args. push ( "--all-targets" . to_owned ( ) ) ;
848849 }
You can’t perform that action at this time.
0 commit comments