Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jul 5, 2018
1 parent f1e3a5a commit f352e98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
1 change: 1 addition & 0 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
#![deny(warnings)]
#![feature(core_intrinsics)]
#![feature(drain_filter)]

#[macro_use]
extern crate build_helper;
Expand Down
17 changes: 5 additions & 12 deletions src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,27 +186,20 @@ impl Step for ToolBuild {
than in a previous build:\n");
println!("the following dependencies are duplicated although they \
have the same features enabled:");
for (id, cur, prev) in &duplicates {
for (id, cur, prev) in duplicates.drain_filter(|(_, cur, prev)| cur.2 == prev.2) {
println!(" {}", id);
if cur.2 == prev.2 {
// same features
println!(" `{}` ({:?})\n `{}` ({:?})", cur.0, cur.1, prev.0, prev.1);
}
// same features
println!(" `{}` ({:?})\n `{}` ({:?})", cur.0, cur.1, prev.0, prev.1);
}
println!("the following dependencies have different features:");
for (id, cur, prev) in duplicates {
println!(" {}", id);
if cur.2 == prev.2 {
continue;
}
let cur_features: HashSet<_> = cur.2.into_iter().collect();
let prev_features: HashSet<_> = prev.2.into_iter().collect();
let cur_extra: Vec<_> = cur_features.difference(&prev_features).collect();
let prev_extra: Vec<_> = prev_features.difference(&cur_features).collect();
println!(" `{}` additionally enabled features {:?} at {:?}",
cur.0, cur_extra, cur.1);
cur.0, &cur_features - &prev_features, cur.1);
println!(" `{}` additionally enabled features {:?} at {:?}",
prev.0, prev_extra, prev.1);
prev.0, &prev_features - &cur_features, prev.1);
}
println!("");
panic!("tools should not compile multiple copies of the same crate");
Expand Down

0 comments on commit f352e98

Please sign in to comment.