File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -62,8 +62,8 @@ pub struct CargoConfig {
62
62
/// Runs cargo check on launch to figure out the correct values of OUT_DIR
63
63
pub load_out_dirs_from_check : bool ,
64
64
65
- /// rustc config
66
- pub rustc : RustcConfig ,
65
+ /// rustc target
66
+ pub default_target : Option < String > ,
67
67
}
68
68
69
69
impl Default for CargoConfig {
@@ -73,7 +73,7 @@ impl Default for CargoConfig {
73
73
all_features : true ,
74
74
features : Vec :: new ( ) ,
75
75
load_out_dirs_from_check : false ,
76
- rustc : RustcConfig { default_target : None } ,
76
+ default_target : None ,
77
77
}
78
78
}
79
79
}
@@ -169,7 +169,7 @@ impl CargoWorkspace {
169
169
if let Some ( parent) = cargo_toml. parent ( ) {
170
170
meta. current_dir ( parent) ;
171
171
}
172
- if let Some ( target) = cargo_features. rustc . default_target . as_ref ( ) {
172
+ if let Some ( target) = cargo_features. default_target . as_ref ( ) {
173
173
meta. other_options ( & [ String :: from ( "--filter-platform" ) , target. clone ( ) ] ) ;
174
174
}
175
175
let meta = meta. exec ( ) . with_context ( || {
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ impl Config {
134
134
set ( value, "/cargo/allFeatures" , & mut self . cargo . all_features ) ;
135
135
set ( value, "/cargo/features" , & mut self . cargo . features ) ;
136
136
set ( value, "/cargo/loadOutDirsFromCheck" , & mut self . cargo . load_out_dirs_from_check ) ;
137
- set ( value, "/cargo/rustc/ defaultTarget" , & mut self . cargo . rustc . default_target ) ;
137
+ set ( value, "/cargo/defaultTarget" , & mut self . cargo . default_target ) ;
138
138
139
139
match get ( value, "/procMacro/enable" ) {
140
140
Some ( true ) => {
Original file line number Diff line number Diff line change 237
237
"default" : false ,
238
238
"markdownDescription" : " Run `cargo check` on startup to get the correct value for package OUT_DIRs"
239
239
},
240
- "rust-analyzer.cargo.rustc. defaultTarget" : {
240
+ "rust-analyzer.cargo.defaultTarget" : {
241
241
"type" : [
242
242
" null" ,
243
243
" string"
You can’t perform that action at this time.
0 commit comments