File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -254,10 +254,18 @@ impl Sysroot {
254
254
. ok ( ) ?;
255
255
let current_dir =
256
256
AbsPathBuf :: try_from ( & * format ! ( "{sysroot_src_dir}/sysroot" ) ) . ok ( ) ?;
257
+
258
+ let mut cargo_config = CargoConfig :: default ( ) ;
259
+ // the sysroot uses `public-dependency`, so we make cargo think it's a nightly
260
+ cargo_config. extra_env . insert (
261
+ "__CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS" . to_owned ( ) ,
262
+ "nightly" . to_owned ( ) ,
263
+ ) ;
264
+
257
265
let res = CargoWorkspace :: fetch_metadata (
258
266
& sysroot_cargo_toml,
259
267
& current_dir,
260
- & CargoConfig :: default ( ) ,
268
+ & cargo_config ,
261
269
None ,
262
270
& |_| ( ) ,
263
271
)
Original file line number Diff line number Diff line change @@ -117,8 +117,6 @@ impl Metrics {
117
117
sh,
118
118
"./target/release/rust-analyzer -q analysis-stats {path} --query-sysroot-metadata"
119
119
)
120
- // the sysroot uses `public-dependency`, so we make cargo think it's a nightly
121
- . env ( "__CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS" , "nightly" )
122
120
. read ( ) ?;
123
121
for ( metric, value, unit) in parse_metrics ( & output) {
124
122
self . report ( & format ! ( "analysis-stats/{name}/{metric}" ) , value, unit. into ( ) ) ;
You can’t perform that action at this time.
0 commit comments