-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Documentation for PermissionsExt::set_mode should link to set_permissions #91707
Labels
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
C-bug
Category: This is a bug.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Comments
hkBst
added a commit
to hkBst/rust
that referenced
this issue
Jan 24, 2025
This fixes rust-lang#91707 by including one overarching example, instead of the small examples that can be misleading.
hkBst
added a commit
to hkBst/rust
that referenced
this issue
Jan 27, 2025
This fixes rust-lang#91707 by including one overarching example, instead of the small examples that can be misleading.
jhpratt
added a commit
to jhpratt/rust
that referenced
this issue
Mar 14, 2025
Overhaul examples for PermissionsExt This fixes rust-lang#91707 by including one overarching example, instead of the small examples that can be misleading.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Mar 14, 2025
Rollup merge of rust-lang#136001 - hkBst:patch-21, r=cuviper Overhaul examples for PermissionsExt This fixes rust-lang#91707 by including one overarching example, instead of the small examples that can be misleading.
github-actions bot
pushed a commit
to model-checking/verify-rust-std
that referenced
this issue
Mar 19, 2025
This fixes rust-lang#91707 by including one overarching example, instead of the small examples that can be misleading.
github-actions bot
pushed a commit
to model-checking/verify-rust-std
that referenced
this issue
Mar 19, 2025
Overhaul examples for PermissionsExt This fixes rust-lang#91707 by including one overarching example, instead of the small examples that can be misleading.
tautschnig
pushed a commit
to model-checking/verify-rust-std
that referenced
this issue
Mar 19, 2025
This fixes rust-lang#91707 by including one overarching example, instead of the small examples that can be misleading.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
C-bug
Category: This is a bug.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
I'm opening this issue because it took me far too much time to realize that set_mode isn't actually doing anything to the underlying file.
Based on the rust std docs I've first tried to set an executable bit with this code:
I expected to see this happen: The code sets the permissions bit.
Instead, this happened: Obviously nothing, because you have to call
std::fs::set_permissions
The docs for
PermissionsExt::set_mode
should link tostd::fs::set_permissions
so users know that set_mode doesn't actually perform anything on the file and instead something like this should be done:This may be relevant for more than only
std::os::unix::fs::PermissionsExt
.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: