Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/cargo/core/compiler/standard_lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand All @@ -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,
Expand All @@ -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)?;
Expand Down
10 changes: 5 additions & 5 deletions tests/testsuite/mock-std/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[workspace]
members = [
"src/liballoc",
"src/libcore",
"src/libproc_macro",
"src/libstd",
"src/libtest",
"library/alloc",
"library/core",
"library/proc_macro",
"library/std",
"library/test",
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@ version = "0.1.0"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
edition = "2018"

[lib]
path = "lib.rs"

[dependencies]
registry-dep-using-core = { version = "*", features = ['mockbuild'] }
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ name = "compiler_builtins"
version = "0.1.0"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
edition = "2018"

[lib]
path = "lib.rs"
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ name = "core"
version = "0.1.0"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
edition = "2018"

[lib]
path = "lib.rs"
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ name = "panic_unwind"
version = "0.1.0"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
edition = "2018"

[lib]
path = "lib.rs"
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ name = "proc_macro"
version = "0.1.0"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
edition = "2018"

[lib]
path = "lib.rs"
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ edition = "2018"
path = "lib.rs"

[dependencies]
alloc = { path = "../../liballoc" }
alloc = { path = "../alloc" }
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ edition = "2018"
path = "lib.rs"

[dependencies]
core = { path = "../../libcore" }
core = { path = "../core" }
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ edition = "2018"
path = "lib.rs"

[dependencies]
std = { path = "../../libstd" }
std = { path = "../std" }
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ version = "0.1.0"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
edition = "2018"

[lib]
path = "lib.rs"

[dependencies]
registry-dep-using-alloc = { version = "*", features = ['mockbuild'] }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@ version = "0.1.0"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
edition = "2018"

[lib]
path = "lib.rs"

[dependencies]
proc_macro = { path = "../libproc_macro" }
std = { path = "../libstd" }
panic_unwind = { path = "../libpanic_unwind" }
compiler_builtins = { path = "../libcompiler_builtins" }
proc_macro = { path = "../proc_macro" }
std = { path = "../std" }
panic_unwind = { path = "../panic_unwind" }
compiler_builtins = { path = "../compiler_builtins" }
registry-dep-using-std = { version = "*", features = ['mockbuild'] }

[features]
Expand Down