-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent failure in case no space left on device in rustdoc #59734
Conversation
src/librustdoc/html/render.rs
Outdated
@@ -1452,11 +1454,12 @@ impl<'a> SourceCollector<'a> { | |||
let mut href = String::new(); | |||
clean_srcpath(&self.scx.src_root, &p, false, |component| { | |||
cur.push(component); | |||
fs::create_dir_all(&cur).unwrap(); | |||
fs::create_dir_all(&cur)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fs::create_dir_all(&cur)?;
can be moved to after the call to clean_srcpath
because create_dir_all
works recursively anyway. That means that clean_srcpath
itself doesn't need to be modified.
r? @ollie27 |
1 similar comment
r? @ollie27 |
ping from triage @GuillaumeGomez you need to address the review left by ollie above. |
Indeed! I'll do it as soon as possible. |
b32b83a
to
feb5a53
Compare
Updated (thanks for the great suggestion @ollie27!). |
Looks good. @bors r+ rollup |
📌 Commit feb5a53 has been approved by |
…ure, r=ollie27 Prevent failure in case no space left on device in rustdoc Fixes rust-lang#59703. r? @QuietMisdreavus
…ure, r=ollie27 Prevent failure in case no space left on device in rustdoc Fixes rust-lang#59703. r? @QuietMisdreavus
…ure, r=ollie27 Prevent failure in case no space left on device in rustdoc Fixes rust-lang#59703. r? @QuietMisdreavus
Rollup of 12 pull requests Successful merges: - #59734 (Prevent failure in case no space left on device in rustdoc) - #59940 (Set cfg(test) when rustdoc is running with --test option) - #60134 (Fix index-page generation) - #60165 (Add Pin::{into_inner,into_inner_unchecked}) - #60183 (Chalkify: Add builtin Copy/Clone) - #60225 (Introduce hir::ExprKind::Use and employ in for loop desugaring.) - #60247 (Implement Debug for Place using Place::iterate) - #60259 (Derive Default instead of new in applicable lint) - #60267 (Add feature-gate for f16c target feature) - #60284 (Do not allow const generics to depend on type parameters) - #60285 (Do not ICE when checking types against foreign fn) - #60289 (Make `-Z allow-features` work for stdlib features) Failed merges: r? @ghost
Fixes #59703.
r? @QuietMisdreavus