@@ -348,31 +348,6 @@ pub trait OpenOptionsExt {
348
348
/// ```
349
349
#[ stable( feature = "open_options_ext" , since = "1.10.0" ) ]
350
350
fn custom_flags ( & mut self , flags : i32 ) -> & mut Self ;
351
-
352
- /// Get the flags as [`libc::c_int`].
353
- ///
354
- /// This method allows the reuse of the OpenOptions as flags argument for [`libc::open`].
355
- ///
356
- /// [`libc::c_int`]: https://docs.rs/libc/*/libc/type.c_int.html
357
- /// [`libc::open`]: https://docs.rs/libc/*/libc/fn.open.html
358
- ///
359
- /// # Examples
360
- ///
361
- /// ```no_run
362
- /// # #![feature(rustc_private)]
363
- /// #![feature(open_options_ext_as_flags)]
364
- /// extern crate libc;
365
- /// use std::ffi::CString;
366
- /// use std::fs::OpenOptions;
367
- /// use std::os::unix::fs::OpenOptionsExt;
368
- ///
369
- /// let mut options = OpenOptions::new();
370
- /// options.write(true).read(true);
371
- /// let file_name = CString::new("foo.txt").unwrap();
372
- /// let file = unsafe { libc::open(file_name.as_c_str().as_ptr(), options.as_flags().unwrap()) };
373
- /// ```
374
- #[ unstable( feature = "open_options_ext_as_flags" , issue = "76801" ) ]
375
- fn as_flags ( & self ) -> io:: Result < libc:: c_int > ;
376
351
}
377
352
378
353
#[ stable( feature = "fs_ext" , since = "1.1.0" ) ]
@@ -386,10 +361,6 @@ impl OpenOptionsExt for OpenOptions {
386
361
self . as_inner_mut ( ) . custom_flags ( flags) ;
387
362
self
388
363
}
389
-
390
- fn as_flags ( & self ) -> io:: Result < libc:: c_int > {
391
- self . as_inner ( ) . as_flags ( )
392
- }
393
364
}
394
365
395
366
/// Unix-specific extensions to [`fs::Metadata`].
0 commit comments