about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-02-11 21:48:46 +0100
committerGitHub <noreply@github.com>2022-02-11 21:48:46 +0100
commit15d71cff2d6286b0f281485637eace03dbe94916 (patch)
treec92961a60d0e519db58f14d93ac4cf479efd9f83
parent642414e8047521d7856e664192754d4105bb1fb1 (diff)
parent22a24c98d3429f9e98e4ce5d096f58620d753458 (diff)
downloadrust-15d71cff2d6286b0f281485637eace03dbe94916.tar.gz
rust-15d71cff2d6286b0f281485637eace03dbe94916.zip
Rollup merge of #93635 - GuillaumeGomez:missing-platform-spec-info, r=Amanieu
Add missing platform-specific information on current_dir and set_current_dir

Fixes #93598.
-rw-r--r--library/std/src/env.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/library/std/src/env.rs b/library/std/src/env.rs
index c06928647d3..5ed9fa9d6f0 100644
--- a/library/std/src/env.rs
+++ b/library/std/src/env.rs
@@ -23,6 +23,11 @@ use crate::sys::os as os_imp;
 
 /// Returns the current working directory as a [`PathBuf`].
 ///
+/// # Platform-specific behavior
+///
+/// This function currently corresponds to the `getcwd` function on Unix
+/// and the `GetCurrentDirectoryW` function on Windows.
+///
 /// # Errors
 ///
 /// Returns an [`Err`] if the current working directory value is invalid.
@@ -49,6 +54,11 @@ pub fn current_dir() -> io::Result<PathBuf> {
 
 /// Changes the current working directory to the specified path.
 ///
+/// # Platform-specific behavior
+///
+/// This function currently corresponds to the `chdir` function on Unix
+/// and the `SetCurrentDirectoryW` function on Windows.
+///
 /// Returns an [`Err`] if the operation fails.
 ///
 /// # Examples