diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-04-25 00:19:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-25 00:19:56 +0200 |
| commit | ecf794bc6929c2e251b3d08baff53d8320073604 (patch) | |
| tree | 9c7fa48640501bb60364c57f2ffc1757583ded00 | |
| parent | 45beb36ef27aace1d44f929c9b5a56c1808b41ee (diff) | |
| parent | f56afa047748e2921f5ff4fe1f6217cd9a5aeeec (diff) | |
| download | rust-ecf794bc6929c2e251b3d08baff53d8320073604.tar.gz rust-ecf794bc6929c2e251b3d08baff53d8320073604.zip | |
Rollup merge of #124335 - ChrisDenton:stabilize-absolute, r=dtolnay
Stabilize `std::path::absolute` FCP complete in https://github.com/rust-lang/rust/issues/92750#issuecomment-2075046985
| -rw-r--r-- | compiler/rustc_fs_util/src/lib.rs | 2 | ||||
| -rw-r--r-- | library/std/src/path.rs | 4 | ||||
| -rw-r--r-- | src/tools/miri/src/lib.rs | 1 | ||||
| -rw-r--r-- | src/tools/miri/tests/pass/shims/path.rs | 1 |
4 files changed, 1 insertions, 7 deletions
diff --git a/compiler/rustc_fs_util/src/lib.rs b/compiler/rustc_fs_util/src/lib.rs index 3359fef8c1c..d376c24cb58 100644 --- a/compiler/rustc_fs_util/src/lib.rs +++ b/compiler/rustc_fs_util/src/lib.rs @@ -1,5 +1,3 @@ -#![feature(absolute_path)] - use std::ffi::CString; use std::fs; use std::io; diff --git a/library/std/src/path.rs b/library/std/src/path.rs index 0636f55771e..1c58671a0cf 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -3332,7 +3332,6 @@ impl Error for StripPrefixError { /// ## Posix paths /// /// ``` -/// #![feature(absolute_path)] /// # #[cfg(unix)] /// fn main() -> std::io::Result<()> { /// use std::path::{self, Path}; @@ -3357,7 +3356,6 @@ impl Error for StripPrefixError { /// ## Windows paths /// /// ``` -/// #![feature(absolute_path)] /// # #[cfg(windows)] /// fn main() -> std::io::Result<()> { /// use std::path::{self, Path}; @@ -3382,7 +3380,7 @@ impl Error for StripPrefixError { /// /// [posix-semantics]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13 /// [windows-path]: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfullpathnamew -#[unstable(feature = "absolute_path", issue = "92750")] +#[stable(feature = "absolute_path", since = "CURRENT_RUSTC_VERSION")] pub fn absolute<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> { let path = path.as_ref(); if path.as_os_str().is_empty() { diff --git a/src/tools/miri/src/lib.rs b/src/tools/miri/src/lib.rs index e1c0da9118d..44727e01ea2 100644 --- a/src/tools/miri/src/lib.rs +++ b/src/tools/miri/src/lib.rs @@ -12,7 +12,6 @@ #![feature(let_chains)] #![feature(lint_reasons)] #![feature(trait_upcasting)] -#![feature(absolute_path)] // Configure clippy and other lints #![allow( clippy::collapsible_else_if, diff --git a/src/tools/miri/tests/pass/shims/path.rs b/src/tools/miri/tests/pass/shims/path.rs index 9fc6e7faefb..cadbeb476bd 100644 --- a/src/tools/miri/tests/pass/shims/path.rs +++ b/src/tools/miri/tests/pass/shims/path.rs @@ -1,5 +1,4 @@ //@compile-flags: -Zmiri-disable-isolation -#![feature(absolute_path)] use std::path::{absolute, Path}; #[track_caller] |
