Skip to content

Commit 89aec1e

Browse files
incr.comp.: Remove out-dated unit test and unnecessary assertion.
1 parent 45a03f1 commit 89aec1e

File tree

2 files changed

+0
-52
lines changed

2 files changed

+0
-52
lines changed

src/librustc/dep_graph/graph.rs

-3
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,6 @@ impl DepGraph {
244244
data.edges.borrow_mut().read(v);
245245

246246
let mut current = data.current.borrow_mut();
247-
debug_assert!(current.node_to_node_index.contains_key(&v),
248-
"DepKind {:?} should be pre-allocated but isn't.",
249-
v.kind);
250247
if let Some(&dep_node_index_new) = current.node_to_node_index.get(&v) {
251248
current.read_index(dep_node_index_new);
252249
} else {

src/librustc_incremental/persist/fs.rs

-49
Original file line numberDiff line numberDiff line change
@@ -953,52 +953,3 @@ fn test_find_source_directory_in_iter() {
953953
PathBuf::from("crate-dir/s-1234-0000-working")].into_iter(), &already_visited),
954954
None);
955955
}
956-
957-
#[test]
958-
fn test_find_metadata_hashes_iter()
959-
{
960-
assert_eq!(find_metadata_hashes_iter("testsvh2",
961-
vec![
962-
String::from("s-timestamp1-testsvh1"),
963-
String::from("s-timestamp2-testsvh2"),
964-
String::from("s-timestamp3-testsvh3"),
965-
].into_iter()),
966-
Some(OsString::from("s-timestamp2-testsvh2"))
967-
);
968-
969-
assert_eq!(find_metadata_hashes_iter("testsvh2",
970-
vec![
971-
String::from("s-timestamp1-testsvh1"),
972-
String::from("s-timestamp2-testsvh2"),
973-
String::from("invalid-name"),
974-
].into_iter()),
975-
Some(OsString::from("s-timestamp2-testsvh2"))
976-
);
977-
978-
assert_eq!(find_metadata_hashes_iter("testsvh2",
979-
vec![
980-
String::from("s-timestamp1-testsvh1"),
981-
String::from("s-timestamp2-testsvh2-working"),
982-
String::from("s-timestamp3-testsvh3"),
983-
].into_iter()),
984-
None
985-
);
986-
987-
assert_eq!(find_metadata_hashes_iter("testsvh1",
988-
vec![
989-
String::from("s-timestamp1-random1-working"),
990-
String::from("s-timestamp2-random2-working"),
991-
String::from("s-timestamp3-random3-working"),
992-
].into_iter()),
993-
None
994-
);
995-
996-
assert_eq!(find_metadata_hashes_iter("testsvh2",
997-
vec![
998-
String::from("timestamp1-testsvh2"),
999-
String::from("timestamp2-testsvh2"),
1000-
String::from("timestamp3-testsvh2"),
1001-
].into_iter()),
1002-
None
1003-
);
1004-
}

0 commit comments

Comments
 (0)