File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -408,24 +408,22 @@ pub trait OpenOptionsExt {
408408 /// Pass custom flags to the `flags` argument of `open`.
409409 ///
410410 /// The bits that define the access mode are masked out with `O_ACCMODE`, to
411- /// ensure they do not interfere with the access mode set by Rusts options.
411+ /// ensure they do not interfere with the access mode set by Rust's options.
412412 ///
413- /// Custom flags can only set flags, not remove flags set by Rusts options.
414- /// This options overwrites any previously set custom flags.
413+ /// Custom flags can only set flags, not remove flags set by Rust's options.
414+ /// This function overwrites any previously- set custom flags.
415415 ///
416416 /// # Examples
417417 ///
418418 /// ```no_run
419- /// # #![feature(rustc_private)]
419+ /// # mod libc { pub const O_NOFOLLOW: i32 = 0; }
420420 /// use std::fs::OpenOptions;
421421 /// use std::os::unix::fs::OpenOptionsExt;
422422 ///
423423 /// # fn main() {
424424 /// let mut options = OpenOptions::new();
425425 /// options.write(true);
426- /// if cfg!(unix) {
427- /// options.custom_flags(libc::O_NOFOLLOW);
428- /// }
426+ /// options.custom_flags(libc::O_NOFOLLOW);
429427 /// let file = options.open("foo.txt");
430428 /// # }
431429 /// ```
You can’t perform that action at this time.
0 commit comments