We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cab5014 commit 697d39dCopy full SHA for 697d39d
src/docbuilder/rustwide_builder.rs
@@ -171,7 +171,12 @@ impl RustwideBuilder {
171
}
172
// NOTE: rustup will automatically refuse to update the toolchain
173
// if `rustfmt` is not available in the newer version
174
- self.toolchain.add_component(&self.workspace, "rustfmt")?;
+ // NOTE: this ignores the error so that you can still run a build without rustfmt.
175
+ // This should only happen if you run a build for the first time when rustfmt isn't available.
176
+ if let Err(err) = self.toolchain.add_component(&self.workspace, "rustfmt") {
177
+ log::warn!("failed into install rustfmt: {}", err);
178
+ log::info!("continuing anyway, since this must be the first build");
179
+ }
180
181
self.rustc_version = self.detect_rustc_version()?;
182
if old_version.as_deref() != Some(&self.rustc_version) {
0 commit comments