Don't give an error when creating a file for the first time#80424
Merged
bors merged 1 commit intorust-lang:masterfrom Dec 31, 2020
Merged
Don't give an error when creating a file for the first time#80424bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Previously, `os.remove` would always give a FileNotFound error the first time you called it, causing bootstrap to make unnecessary copies. This now only calls `remove()` if the file exists, avoiding the unnecessary error.
Contributor
|
(rust-highfive has picked a reviewer for you, use r? to override) |
Member
|
@bors r+ |
Collaborator
|
📌 Commit 7ac02bd has been approved by |
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Dec 30, 2020
…mulacrum Don't give an error when creating a file for the first time Previously, `os.remove` would always give a FileNotFound error the first time you called it, causing bootstrap to make unnecessary copies. This now only calls `remove()` if the file exists, avoiding the unnecessary error. This is a pretty small cleanup but I think it's useful. Taken from rust-lang#79540.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 30, 2020
Rollup of 9 pull requests Successful merges: - rust-lang#78934 (refactor: removing library/alloc/src/vec/mod.rs ignore-tidy-filelength) - rust-lang#79479 (Add `Iterator::intersperse`) - rust-lang#80128 (Edit rustc_ast::ast::FieldPat docs) - rust-lang#80424 (Don't give an error when creating a file for the first time) - rust-lang#80458 (Some Promotion Refactoring) - rust-lang#80488 (Do not create dangling &T in Weak<T>::drop) - rust-lang#80491 (Miri: make size/align_of_val work for dangling raw ptrs) - rust-lang#80495 (Rename kw::Invalid -> kw::Empty) - rust-lang#80513 (Add regression test for rust-lang#80062) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously,
os.removewould always give a FileNotFound error the firsttime you called it, causing bootstrap to make unnecessary copies. This
now only calls
remove()if the file exists, avoiding the unnecessaryerror.
This is a pretty small cleanup but I think it's useful. Taken from #79540.