Skip to content

doc: list all remove_dir_all fallback targets - #158999

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Muhtasim-Munif-Fahim:codex/rust-remove-dir-all-docs
Aug 20, 2026
Merged

doc: list all remove_dir_all fallback targets#158999
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Muhtasim-Munif-Fahim:codex/rust-remove-dir-all-docs

Conversation

@Muhtasim-Munif-Fahim

@Muhtasim-Munif-Fahim Muhtasim-Munif-Fahim commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

This adds the still-missing
emove_dir_all fallback targets to the TOCTOU warning and updates the wording to describe the current implementation detail directly.

Closes #153781

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 9, 2026
@rustbot

rustbot commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project is excited to review your changes, and you should hear from @aapoalas (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue
Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 13 candidates
  • Random selection from 6 candidates

Comment thread library/std/src/fs.rs Outdated
/// TOCTOU races, Miri will not do so.
/// - **QNX**, **Redox OS**, **VxWorks**: This function does not protect against TOCTOU races, as
/// the underlying platform does not implement the required platform support to do so.
/// - **ESP-IDF**, **Horizon**, **PS Vita**, **QNX**, **Redox OS**, **VxWorks**: This function

@aapoalas aapoalas Jul 19, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick (blocking): I'd keep the original phrasing. It's technically wrong for QNX, but that's just a great way to rope the QNX folks in to remove this fallback when libc bindings for the platform are available. When QNX then inevitably gets removed from this list, the original phrasing will be more informative of why there is no TOCTOU protection: because there cannot be.

Also, "the fallback implementation" is only mentioned here so it means nothing to the reader of this documentation, only to the writer. Effectively it is internal documentation and should be in a // comment if anywhere. For a reader it is more important to hear that the reason is in the platform - hearing that the reason is that "this function uses the fallback implementation" sounds like they should come in and open a PR to remove the fallback implementation usage, which is not the case.

... Honestly; I'm not even sure if it's right to mention ESP-IDF, Horizon, and PS Vita here since if they don't have symlink support then there are no symlink TOCTOU races to protect against. But it's fine I guess.

View changes since the review

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 19, 2026
@rustbot

rustbot commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 19, 2026
@Muhtasim-Munif-Fahim

Copy link
Copy Markdown
Contributor Author

Updated the docs to drop the implementation-detail wording and restored the original phrasing explaining the platform limitation. The expanded platform list (ESP-IDF, Horizon, PS Vita, QNX, Redox OS, VxWorks) is kept. Ready for re-review.

@aapoalas aapoalas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bors squash r+ rollup

View changes since this review

@rust-bors

rust-bors Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Unknown argument "r+". Did you mean to use @bors squash [msg|message="<commit-msg>"|description]? Run @bors help or go to https://bors.rust-lang.org/help to see available commands.

@aapoalas

Copy link
Copy Markdown
Contributor

@bors squash

@rust-bors

This comment has been minimized.

* doc: list all remove_dir_all fallback targets
* doc: restore original TOCTOU phrasing for remove_dir_all fallback list

Keep the expanded platform list but drop the writer-facing "uses the fallback
implementation" wording per review, restoring the original reason phrasing that
explains protection is absent because the underlying platform lacks the required
support.

Co-authored-by: Md Muhtasim Munif Fahim <s1911024120@ru.ac.bd>
@aapoalas

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors

rust-bors Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

📌 Commit eb3629f has been approved by aapoalas

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 10. This pull request will be tested once the tree is reopened.

Reason for tree closure: To keep an eye on

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 19, 2026
@rust-bors

rust-bors Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

🔨 2 commits were squashed into 9f30bc4.

This pull request was unapproved.

@rust-bors
rust-bors Bot force-pushed the codex/rust-remove-dir-all-docs branch from eb3629f to 9f30bc4 Compare August 19, 2026 19:20
@rustbot

rustbot commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Warning ⚠️

@aapoalas

Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors

rust-bors Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 9f30bc4 has been approved by aapoalas

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 10. This pull request will be tested once the tree is reopened.

Reason for tree closure: To keep an eye on

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 19, 2026
…move-dir-all-docs, r=aapoalas

doc: list all remove_dir_all fallback targets

This adds the still-missing 
emove_dir_all fallback targets to the TOCTOU warning and updates the wording to describe the current implementation detail directly.

Closes rust-lang#153781
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 20, 2026
…move-dir-all-docs, r=aapoalas

doc: list all remove_dir_all fallback targets

This adds the still-missing 
emove_dir_all fallback targets to the TOCTOU warning and updates the wording to describe the current implementation detail directly.

Closes rust-lang#153781
rust-bors Bot pushed a commit that referenced this pull request Aug 20, 2026
…uwer

Rollup of 26 pull requests

Successful merges:

 - #161384 (Bust sccache's cache)
 - #161325 (Bump bootstrap to 1.99.0-beta.1)
 - #161344 (Update the `rustc-perf` submodule)
 - #161366 (Subtree sync for rustc_codegen_cranelift)
 - #159071 ([PAC] Encoder and hash (1/8))
 - #160639 ([rustdoc] Only generate search DOM elements if the search is actually needed)
 - #161068 (Ensure TLS accesses don't call the global allocator through panic (part 3) )
 - #161332 (Some `GlobalCtxt`/`Session` cleanups)
 - #150931 (rustdoc: Always document `#[repr(transparent)]` if `#[rustc_pub_transparent]` is applied)
 - #158999 (doc: list all remove_dir_all fallback targets)
 - #160582 (Add `remove hidden_glob_reexports item breaks downstream` test)
 - #160876 (remove unwrap from write_mir_fn_graphviz)
 - #160927 (Enhance EII UI tests)
 - #161070 (fix arm homogeneous aggregate ABI)
 - #161190 (fix crash in async-drop and async-gen)
 - #161236 (Download auto jobs in citool in parallel)
 - #161254 (Reserve capacity for 3% anon nodes)
 - #161283 (Tighten the language used for documenting `TargetOptions::llvm_abiname`)
 - #161291 (Rename `ProjectionPredicate` and `TraitPredicate`)
 - #161293 (add relnotes 1.98.0)
 - #161299 (Remove a bunch of unnecessary explicit lifetimes)
 - #161307 (make ARM maintainers pingable)
 - #161308 (Add regression test for rustc diagnostic to recognize variables in match guards)
 - #161346 (Don't rely on std traits not being const in tests)
 - #161360 (vec: fixup the name that i forgot)
 - #161367 (Reflect current PR title names for subtree syncs in triagebot no-merges)
@rust-bors
rust-bors Bot merged commit 38b1ad3 into rust-lang:main Aug 20, 2026
13 checks passed
rust-bors Bot pushed a commit that referenced this pull request Aug 20, 2026
Rollup merge of #158999 - Muhtasim-Munif-Fahim:codex/rust-remove-dir-all-docs, r=aapoalas

doc: list all remove_dir_all fallback targets

This adds the still-missing 
emove_dir_all fallback targets to the TOCTOU warning and updates the wording to describe the current implementation detail directly.

Closes #153781
@rustbot rustbot added this to the 1.100.0 milestone Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fs::remove_dir_all: TOCTOU doc incomplete, five targets missing from warning

3 participants