Skip to content

Commit e50069f

Browse files
authored
Rollup merge of #88177 - joshtriplett:stabilize-chroot, r=m-ou-se
Stabilize std::os::unix::fs::chroot I've verified that this works as documented, and I've tested it in (a nightly build of) production software as a replacement for an unsafe call to `libc::chroot`. It's been available in nightly for a few releases. I think it's ready to stabilize. --- Tracking issue: #84715
2 parents fcce644 + 4046667 commit e50069f

File tree

1 file changed

+1
-2
lines changed
  • library/std/src/os/unix

1 file changed

+1
-2
lines changed

library/std/src/os/unix/fs.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,6 @@ impl DirBuilderExt for fs::DirBuilder {
934934
/// # Examples
935935
///
936936
/// ```no_run
937-
/// #![feature(unix_chroot)]
938937
/// use std::os::unix::fs;
939938
///
940939
/// fn main() -> std::io::Result<()> {
@@ -944,7 +943,7 @@ impl DirBuilderExt for fs::DirBuilder {
944943
/// Ok(())
945944
/// }
946945
/// ```
947-
#[unstable(feature = "unix_chroot", issue = "84715")]
946+
#[stable(feature = "unix_chroot", since = "1.56.0")]
948947
#[cfg(not(any(target_os = "fuchsia", target_os = "vxworks")))]
949948
pub fn chroot<P: AsRef<Path>>(dir: P) -> io::Result<()> {
950949
sys::fs::chroot(dir.as_ref())

0 commit comments

Comments
 (0)