Subcommand::Format { .. } | Subcommand::Clean { .. } => panic!(),
};
- let builder = Builder {
+ Builder {
build,
top_stage: build.config.stage.unwrap_or(2),
kind,
stack: RefCell::new(Vec::new()),
time_spent_on_dependencies: Cell::new(Duration::new(0, 0)),
paths: paths.to_owned(),
- };
-
- builder
+ }
}
pub fn execute_cli(&self) {
cargo.env("RUST_CHECK", "1");
}
- let stage;
- if compiler.stage == 0 && self.local_rebuild {
+ let stage = if compiler.stage == 0 && self.local_rebuild {
// Assume the local-rebuild rustc already has stage1 features.
- stage = 1;
+ 1
} else {
- stage = compiler.stage;
- }
+ compiler.stage
+ };
let mut rustflags = Rustflags::new(&target);
if stage != 0 {
//
// Only clear out the directory if we're compiling std; otherwise, we
// should let Cargo take care of things for us (via depdep info)
- if !self.config.dry_run && mode == Mode::ToolStd && cmd == "build" {
+ if !self.config.dry_run && mode == Mode::Std && cmd == "build" {
self.clear_if_dirty(&out_dir, &self.rustc(compiler));
}
};
if self.config.print_step_timings && dur > Duration::from_millis(100) {
- println!(
- "[TIMING] {:?} -- {}.{:03}",
- step,
- dur.as_secs(),
- dur.subsec_nanos() / 1_000_000
- );
+ println!("[TIMING] {:?} -- {}.{:03}", step, dur.as_secs(), dur.subsec_millis());
}
{
fn arg(&mut self, arg: &str) -> &mut Self {
assert_eq!(arg.split_whitespace().count(), 1);
- if self.0.len() > 0 {
+ if !self.0.is_empty() {
self.0.push_str(" ");
}
self.0.push_str(arg);