From 769ac7cc91cefaffe8a11e6edda6cb6e96a20cb8 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Wed, 29 Jul 2020 12:20:51 +0900 Subject: [PATCH] Fix libraries paths following upstream --- src/cargo/core/compiler/standard_lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cargo/core/compiler/standard_lib.rs b/src/cargo/core/compiler/standard_lib.rs index a83650f33..ed3dd7733 100644 --- a/src/cargo/core/compiler/standard_lib.rs +++ b/src/cargo/core/compiler/standard_lib.rs @@ -46,7 +46,7 @@ pub fn resolve_std<'cfg>( let patches = to_patch .iter() .map(|&name| { - let source_path = SourceId::for_path(&src_path.join("src").join("tools").join(name))?; + let source_path = SourceId::for_path(&src_path.join("library").join(name))?; let dep = Dependency::parse_no_deprecated(name, None, source_path)?; Ok(dep) }) @@ -55,10 +55,10 @@ pub fn resolve_std<'cfg>( let mut patch = HashMap::new(); patch.insert(crates_io_url, patches); let members = vec![ - String::from("src/libstd"), - String::from("src/libcore"), - String::from("src/liballoc"), - String::from("src/libtest"), + String::from("library/std"), + String::from("library/core"), + String::from("library/alloc"), + String::from("library/test"), ]; let ws_config = crate::core::WorkspaceConfig::Root(crate::core::WorkspaceRootConfig::new( &src_path, @@ -85,7 +85,7 @@ pub fn resolve_std<'cfg>( // other crates need to alter their features, this should be fine, for // now. Perhaps in the future features will be decoupled from the resolver // and it will be easier to control feature selection. - let current_manifest = src_path.join("src/libtest/Cargo.toml"); + let current_manifest = src_path.join("library/test/Cargo.toml"); // TODO: Consider doing something to enforce --locked? Or to prevent the // lock file from being written, such as setting ephemeral. let mut std_ws = Workspace::new_virtual(src_path, current_manifest, virtual_manifest, config)?;