mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 02:03:53 +00:00
Fixed unord mistake
This commit is contained in:
parent
96b577860d
commit
6f2d3dee17
@ -62,11 +62,6 @@ impl<T, I: Iterator<Item = T>> UnordItems<T, I> {
|
|||||||
UnordItems(self.0.filter_map(f))
|
UnordItems(self.0.filter_map(f))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
|
||||||
pub fn for_each<F: Fn(T) -> ()>(self, f: F) {
|
|
||||||
self.0.for_each(|x| f(x));
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn max(self) -> Option<T>
|
pub fn max(self) -> Option<T>
|
||||||
where
|
where
|
||||||
|
@ -377,15 +377,15 @@ impl<'tcx> DirtyCleanVisitor<'tcx> {
|
|||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
self.checked_attrs.insert(attr.id);
|
self.checked_attrs.insert(attr.id);
|
||||||
assertion.clean.items().for_each(|label| {
|
assertion.clean.to_sorted(&(), false).iter().for_each(|label| {
|
||||||
let dep_node = DepNode::from_label_string(self.tcx, &label, def_path_hash).unwrap();
|
let dep_node = DepNode::from_label_string(self.tcx, &label, def_path_hash).unwrap();
|
||||||
self.assert_clean(item_span, dep_node);
|
self.assert_clean(item_span, dep_node);
|
||||||
});
|
});
|
||||||
assertion.dirty.items().for_each(|label| {
|
assertion.dirty.to_sorted(&(), false).iter().for_each(|label| {
|
||||||
let dep_node = DepNode::from_label_string(self.tcx, &label, def_path_hash).unwrap();
|
let dep_node = DepNode::from_label_string(self.tcx, &label, def_path_hash).unwrap();
|
||||||
self.assert_dirty(item_span, dep_node);
|
self.assert_dirty(item_span, dep_node);
|
||||||
});
|
});
|
||||||
assertion.loaded_from_disk.items().for_each(|label| {
|
assertion.loaded_from_disk.to_sorted(&(), false).iter().for_each(|label| {
|
||||||
let dep_node = DepNode::from_label_string(self.tcx, &label, def_path_hash).unwrap();
|
let dep_node = DepNode::from_label_string(self.tcx, &label, def_path_hash).unwrap();
|
||||||
self.assert_loaded_from_disk(item_span, dep_node);
|
self.assert_loaded_from_disk(item_span, dep_node);
|
||||||
});
|
});
|
||||||
|
@ -674,7 +674,8 @@ pub fn garbage_collect_session_directories(sess: &Session) -> io::Result<()> {
|
|||||||
|
|
||||||
// Delete all lock files, that don't have an associated directory. They must
|
// Delete all lock files, that don't have an associated directory. They must
|
||||||
// be some kind of leftover
|
// be some kind of leftover
|
||||||
lock_file_to_session_dir.items().for_each(|(lock_file_name, directory_name)| {
|
lock_file_to_session_dir.to_sorted(&(), false).iter().for_each(
|
||||||
|
|(lock_file_name, directory_name)| {
|
||||||
if directory_name.is_none() {
|
if directory_name.is_none() {
|
||||||
let Ok(timestamp) = extract_timestamp_from_session_dir(lock_file_name) else {
|
let Ok(timestamp) = extract_timestamp_from_session_dir(lock_file_name) else {
|
||||||
debug!(
|
debug!(
|
||||||
@ -702,7 +703,8 @@ pub fn garbage_collect_session_directories(sess: &Session) -> io::Result<()> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
);
|
||||||
|
|
||||||
// Filter out `None` directories
|
// Filter out `None` directories
|
||||||
let lock_file_to_session_dir: UnordMap<String, String> =
|
let lock_file_to_session_dir: UnordMap<String, String> =
|
||||||
|
@ -46,7 +46,7 @@ pub fn copy_cgu_workproduct_to_incr_comp_cache_dir(
|
|||||||
|
|
||||||
/// Removes files for a given work product.
|
/// Removes files for a given work product.
|
||||||
pub fn delete_workproduct_files(sess: &Session, work_product: &WorkProduct) {
|
pub fn delete_workproduct_files(sess: &Session, work_product: &WorkProduct) {
|
||||||
work_product.saved_files.items().for_each(|(_, path)| {
|
work_product.saved_files.to_sorted(&(), false).iter().for_each(|(_, path)| {
|
||||||
let path = in_incr_comp_dir_sess(sess, path);
|
let path = in_incr_comp_dir_sess(sess, path);
|
||||||
if let Err(err) = std_fs::remove_file(&path) {
|
if let Err(err) = std_fs::remove_file(&path) {
|
||||||
sess.emit_warning(errors::DeleteWorkProduct { path: &path, err });
|
sess.emit_warning(errors::DeleteWorkProduct { path: &path, err });
|
||||||
|
Loading…
Reference in New Issue
Block a user