Skip to content

Commit

Permalink
Add comments why install steps should never fail.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss authored and Mark-Simulacrum committed Jul 22, 2021
1 parent ef7502b commit cc9284d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bootstrap/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,15 @@ macro_rules! install {

install!((self, builder, _config),
Docs, "src/doc", _config.docs, only_hosts: false, {
// `expect` should be safe, only None when config.docs is false,
// which is guarded in `should_run`
let tarball = builder.ensure(dist::Docs { host: self.target }).expect("missing docs");
install_sh(builder, "docs", self.compiler.stage, Some(self.target), &tarball);
};
Std, "library/std", true, only_hosts: false, {
for target in &builder.targets {
// `expect` should be safe, only None when host != build, but this
// only runs when host == build
let tarball = builder.ensure(dist::Std {
compiler: self.compiler,
target: *target
Expand Down Expand Up @@ -217,6 +221,8 @@ install!((self, builder, _config),
}
};
Analysis, "analysis", Self::should_build(_config), only_hosts: false, {
// `expect` should be safe, only None with host != build, but this
// only uses the `build` compiler
let tarball = builder.ensure(dist::Analysis {
// Find the actual compiler (handling the full bootstrap option) which
// produced the save-analysis data because that data isn't copied
Expand Down

0 comments on commit cc9284d

Please sign in to comment.