Skip to content

Commit

Permalink
Add doc alias for chdir to std::env::set_current_dir
Browse files Browse the repository at this point in the history
Searching for `chdir` in the Rust documentation produces no useful
results.
  • Loading branch information
joshtriplett committed Apr 29, 2021
1 parent 814a560 commit c185f08
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/std/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ pub fn current_dir() -> io::Result<PathBuf> {
/// assert!(env::set_current_dir(&root).is_ok());
/// println!("Successfully changed working directory to {}!", root.display());
/// ```
#[doc(alias = "chdir")]
#[stable(feature = "env", since = "1.0.0")]
pub fn set_current_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
os_imp::chdir(path.as_ref())
Expand Down

0 comments on commit c185f08

Please sign in to comment.