Skip to content

Commit

Permalink
Rollup merge of rust-lang#124335 - ChrisDenton:stabilize-absolute, r=…
Browse files Browse the repository at this point in the history
…dtolnay

Stabilize `std::path::absolute`

FCP complete in rust-lang#92750 (comment)
  • Loading branch information
matthiaskrgr authored Apr 24, 2024
2 parents 45beb36 + f56afa0 commit ecf794b
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions compiler/rustc_fs_util/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(absolute_path)]

use std::ffi::CString;
use std::fs;
use std::io;
Expand Down
4 changes: 1 addition & 3 deletions library/std/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand All @@ -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};
Expand All @@ -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() {
Expand Down
1 change: 0 additions & 1 deletion src/tools/miri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/tools/miri/tests/pass/shims/path.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@compile-flags: -Zmiri-disable-isolation
#![feature(absolute_path)]
use std::path::{absolute, Path};

#[track_caller]
Expand Down

0 comments on commit ecf794b

Please sign in to comment.