Rollup merge of #137119 - onur-ozkan:fix-broken-core, r=jieyouxu

fix broken `x {doc, build} core`

Fixes #137115
This commit is contained in:
Matthias Krüger 2025-02-16 17:14:07 +01:00 committed by GitHub
commit e802a8cc01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 9 deletions

View file

@ -95,7 +95,7 @@ impl Step for Std {
const DEFAULT: bool = true;
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.crate_or_deps("sysroot").path("library").alias("core")
run.crate_or_deps("sysroot").path("library")
}
fn make_run(run: RunConfig<'_>) {

View file

@ -572,10 +572,7 @@ impl Step for Std {
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
let builder = run.builder;
run.crate_or_deps("sysroot")
.path("library")
.alias("core")
.default_condition(builder.config.docs)
run.crate_or_deps("sysroot").path("library").default_condition(builder.config.docs)
}
fn make_run(run: RunConfig<'_>) {

View file

@ -127,10 +127,14 @@ impl RunConfig<'_> {
pub fn cargo_crates_in_set(&self) -> Vec<String> {
let mut crates = Vec::new();
for krate in &self.paths {
let path = krate.assert_single_path();
let Some(crate_name) = self.builder.crate_paths.get(&path.path) else {
panic!("missing crate for path {}", path.path.display())
};
let path = &krate.assert_single_path().path;
let crate_name = self
.builder
.crate_paths
.get(path)
.unwrap_or_else(|| panic!("missing crate for path {}", path.display()));
crates.push(crate_name.to_string());
}
crates