Skip to content

Commit c8fe62f

Browse files
Rollup merge of #166111 - MarioIlRosso:issue-130058-fix, r=JohnTitor
Add `cd` alias to `std::env::set_current_dir` Addresses #130058, let me know if there are any suggestions to add. Adds the `cd` alias to the [`std::env::set_current_dir`](https://doc.rust-lang.org/stable/std/env/fn.set_current_dir.html) function, which can make finding it easier.
2 parents e718520 + 30ae715 commit c8fe62f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎library/std/src/env.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ pub fn current_dir() -> io::Result<PathBuf> {
7575
/// assert!(env::set_current_dir(&root).is_ok());
7676
/// println!("Successfully changed working directory to {}!", root.display());
7777
/// ```
78-
#[doc(alias = "chdir", alias = "SetCurrentDirectory", alias = "SetCurrentDirectoryW")]
78+
#[doc(alias = "cd", alias = "chdir", alias = "SetCurrentDirectory", alias = "SetCurrentDirectoryW")]
7979
#[stable(feature = "env", since = "1.0.0")]
8080
pub fn set_current_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
8181
paths_imp::chdir(path.as_ref())

0 commit comments

Comments
 (0)