Skip to content

Commit 933c7fd

Browse files
committed
Allow deprecated for std::env::home_dir
rust-lang/rust#132515 (comment)
1 parent 949cf8f commit 933c7fd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

internal/src/home.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,9 @@ pub fn cargo_home() -> Option<PathBuf> {
1515
pub use home::home_dir;
1616

1717
#[rustversion::since(1.86)]
18-
pub use std::env::home_dir;
18+
pub fn home_dir() -> Option<PathBuf> {
19+
// smoelius: The `deprecated` attribute hasn't been removed yet:
20+
// https://github.com/rust-lang/rust/pull/132515#discussion_r1829715262
21+
#[expect(deprecated)]
22+
std::env::home_dir()
23+
}

0 commit comments

Comments
 (0)