about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2021-09-02 19:10:12 +0200
committerGitHub <noreply@github.com>2021-09-02 19:10:12 +0200
commite50069ff4f4b8c95443103d747f6aa22e64dc22c (patch)
treedf8860a153fae2edb268867f10e85bf42c1ec80a
parentfcce644119cf4e8e36001368e514bb5ed67cb855 (diff)
parent40466672b5988e8bdbbcf089c788003e3c81b1b3 (diff)
downloadrust-e50069ff4f4b8c95443103d747f6aa22e64dc22c.tar.gz
rust-e50069ff4f4b8c95443103d747f6aa22e64dc22c.zip
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: https://github.com/rust-lang/rust/issues/84715
-rw-r--r--library/std/src/os/unix/fs.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/library/std/src/os/unix/fs.rs b/library/std/src/os/unix/fs.rs
index e4ce788f741..6cf37f23c57 100644
--- a/library/std/src/os/unix/fs.rs
+++ b/library/std/src/os/unix/fs.rs
@@ -934,7 +934,6 @@ impl DirBuilderExt for fs::DirBuilder {
 /// # Examples
 ///
 /// ```no_run
-/// #![feature(unix_chroot)]
 /// use std::os::unix::fs;
 ///
 /// fn main() -> std::io::Result<()> {
@@ -944,7 +943,7 @@ impl DirBuilderExt for fs::DirBuilder {
 ///     Ok(())
 /// }
 /// ```
-#[unstable(feature = "unix_chroot", issue = "84715")]
+#[stable(feature = "unix_chroot", since = "1.56.0")]
 #[cfg(not(any(target_os = "fuchsia", target_os = "vxworks")))]
 pub fn chroot<P: AsRef<Path>>(dir: P) -> io::Result<()> {
     sys::fs::chroot(dir.as_ref())