File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -277,6 +277,9 @@ impl CargoWorkspace {
277
277
/// Fetches the metadata for the given `cargo_toml` manifest.
278
278
/// A successful result may contain another metadata error if the initial fetching failed but
279
279
/// the `--no-deps` retry succeeded.
280
+ ///
281
+ /// The sysroot is used to set the `RUSTUP_TOOLCHAIN` env var when invoking cargo
282
+ /// to ensure that the rustup proxy uses the correct toolchain.
280
283
pub fn fetch_metadata (
281
284
cargo_toml : & ManifestPath ,
282
285
current_dir : & AbsPath ,
Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ impl Sysroot {
247
247
let library_manifest = ManifestPath :: try_from ( src_root. join ( "Cargo.toml" ) ) . unwrap ( ) ;
248
248
if fs:: metadata ( & library_manifest) . is_ok ( ) {
249
249
if let Some ( loaded) =
250
- Self :: load_library_via_cargo ( library_manifest, src_root, cargo_config)
250
+ self . load_library_via_cargo ( library_manifest, src_root, cargo_config)
251
251
{
252
252
return Some ( loaded) ;
253
253
}
@@ -326,6 +326,7 @@ impl Sysroot {
326
326
}
327
327
328
328
fn load_library_via_cargo (
329
+ & self ,
329
330
library_manifest : ManifestPath ,
330
331
rust_lib_src_dir : & AbsPathBuf ,
331
332
cargo_config : & CargoMetadataConfig ,
@@ -342,7 +343,7 @@ impl Sysroot {
342
343
& library_manifest,
343
344
rust_lib_src_dir,
344
345
& cargo_config,
345
- & Sysroot :: empty ( ) ,
346
+ self ,
346
347
// Make sure we never attempt to write to the sysroot
347
348
true ,
348
349
& |_| ( ) ,
You can’t perform that action at this time.
0 commit comments