diff options
| author | bors <bors@rust-lang.org> | 2025-06-29 07:22:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-06-29 07:22:39 +0000 |
| commit | 5ca574e85b67cec0a6fc3fddfe398cbe676c9c69 (patch) | |
| tree | c7d3e5ee81cf83ba8226119a5097b80f093d2cdd /library/std/src | |
| parent | dddd7ab96229ea5f2ca96afcb5984a9831393a13 (diff) | |
| parent | a262c001f6fd131e2eca2d45627fa5bb7754fd6c (diff) | |
Auto merge of #143173 - matthiaskrgr:rollup-ieu5k05, r=matthiaskrgr
Rollup of 11 pull requests Successful merges: - rust-lang/rust#142021 (Doc: clarify priority of lint level sources) - rust-lang/rust#142367 (Add regression test for rust-lang/rust#137857 to ensure that we generate intra doc links for extern crate items.) - rust-lang/rust#142641 (Generate symbols.o for proc-macros too) - rust-lang/rust#142889 (Clarify doc comment on unix OpenOptions) - rust-lang/rust#143063 (explain `ImportData::imported_module`) - rust-lang/rust#143088 (Improve documentation of `TagEncoding`) - rust-lang/rust#143135 (fix typos on some doc comments) - rust-lang/rust#143138 (Port `#[link_name]` to the new attribute parsing infrastructure) - rust-lang/rust#143155 (`librustdoc` house-keeping 🧹) - rust-lang/rust#143169 (Remove unused feature gates) - rust-lang/rust#143171 (Fix the span of trait bound modifier `[const]`) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/os/unix/fs.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/library/std/src/os/unix/fs.rs b/library/std/src/os/unix/fs.rs index 4f9259f39c1..b776df3dde1 100644 --- a/library/std/src/os/unix/fs.rs +++ b/library/std/src/os/unix/fs.rs @@ -408,24 +408,22 @@ pub trait OpenOptionsExt { /// Pass custom flags to the `flags` argument of `open`. /// /// The bits that define the access mode are masked out with `O_ACCMODE`, to - /// ensure they do not interfere with the access mode set by Rusts options. + /// ensure they do not interfere with the access mode set by Rust's options. /// - /// Custom flags can only set flags, not remove flags set by Rusts options. - /// This options overwrites any previously set custom flags. + /// Custom flags can only set flags, not remove flags set by Rust's options. + /// This function overwrites any previously-set custom flags. /// /// # Examples /// /// ```no_run - /// # #![feature(rustc_private)] + /// # mod libc { pub const O_NOFOLLOW: i32 = 0; } /// use std::fs::OpenOptions; /// use std::os::unix::fs::OpenOptionsExt; /// /// # fn main() { /// let mut options = OpenOptions::new(); /// options.write(true); - /// if cfg!(unix) { - /// options.custom_flags(libc::O_NOFOLLOW); - /// } + /// options.custom_flags(libc::O_NOFOLLOW); /// let file = options.open("foo.txt"); /// # } /// ``` |
