File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,10 @@ impl Config {
242242 set ( value, "/checkOnSave/command" , command) ;
243243 set ( value, "/checkOnSave/allTargets" , all_targets) ;
244244 set ( value, "/checkOnSave/allFeatures" , all_features) ;
245- * features = self . cargo . features . clone ( ) ;
245+ set ( value, "/checkOnSave/features" , features) ;
246+ if features. is_empty ( ) && !self . cargo . features . is_empty ( ) {
247+ * features = self . cargo . features . clone ( ) ;
248+ }
246249 }
247250 }
248251 } ;
Original file line number Diff line number Diff line change 322322 "default" : false ,
323323 "markdownDescription" : " Check with all features (will be passed as `--all-features`)"
324324 },
325+ "rust-analyzer.checkOnSave.features" : {
326+ "type" : " array" ,
327+ "items" : {
328+ "type" : " string"
329+ },
330+ "default" : [],
331+ "description" : " List of features to activate. Set to `rust-analyzer.cargo.features` if empty."
332+ },
325333 "rust-analyzer.inlayHints.enable" : {
326334 "type" : " boolean" ,
327335 "default" : true ,
You can’t perform that action at this time.
0 commit comments