Skip to content

Commit 3bd6cdf

Browse files
committed
Fix tests
1 parent 5958447 commit 3bd6cdf

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/bootstrap/builder/tests.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,8 @@ mod dist {
511511
target: host,
512512
mode: Mode::Std,
513513
test_kind: test::TestKind::Test,
514-
krate: INTERNER.intern_str("std"),
514+
krate_name: INTERNER.intern_str("std"),
515+
krate_path: "library/std".into(),
515516
},]
516517
);
517518
}

src/bootstrap/cache.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,15 +271,15 @@ impl Cache {
271271

272272
#[cfg(test)]
273273
impl Cache {
274-
pub fn all<S: Ord + Copy + Step>(&mut self) -> Vec<(S, S::Output)> {
274+
pub fn all<S: Ord + Step>(&mut self) -> Vec<(S, S::Output)> {
275275
let cache = self.0.get_mut();
276276
let type_id = TypeId::of::<S>();
277277
let mut v = cache
278278
.remove(&type_id)
279279
.map(|b| b.downcast::<HashMap<S, S::Output>>().expect("correct type"))
280280
.map(|m| m.into_iter().collect::<Vec<_>>())
281281
.unwrap_or_default();
282-
v.sort_by_key(|&(a, _)| a);
282+
v.sort_by_key(|(a, _)| a.clone());
283283
v
284284
}
285285

src/bootstrap/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1824,7 +1824,7 @@ impl Step for CrateLibrustc {
18241824
target: run.target,
18251825
test_kind,
18261826
krate_name: krate.name,
1827-
krate_path: krate.path.clone(),
1827+
krate_path: krate.local_path(builder.build),
18281828
});
18291829
}
18301830
}
@@ -1873,7 +1873,7 @@ impl Step for Crate {
18731873
mode,
18741874
test_kind,
18751875
krate_name: krate.name,
1876-
krate_path: krate.path.clone(),
1876+
krate_path: krate.local_path(builder.build),
18771877
});
18781878
};
18791879

0 commit comments

Comments
 (0)