]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/env.rs
Rollup merge of #68093 - GuillaumeGomez:fix-deref-impl-typedef, r=oli-obk
[rust.git] / src / libstd / env.rs
index cf71b61b917a748e42d0ac5dcaf29d4c9da3444d..af35a5d9b7c47966f1fcde33cf28ffb9e42869d6 100644 (file)
@@ -6,7 +6,7 @@
 //!
 //! There are several functions and structs in this module that have a
 //! counterpart ending in `os`. Those ending in `os` will return an [`OsString`]
-//! and those without will be returning a [`String`].
+//! and those without will return a [`String`].
 //!
 //! [`OsString`]: ../../std/ffi/struct.OsString.html
 //! [`String`]: ../string/struct.String.html
@@ -284,6 +284,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
 
 #[stable(feature = "env", since = "1.0.0")]
 impl Error for VarError {
+    #[allow(deprecated)]
     fn description(&self) -> &str {
         match *self {
             VarError::NotPresent => "environment variable not found",
@@ -526,6 +527,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
 
 #[stable(feature = "env", since = "1.0.0")]
 impl Error for JoinPathsError {
+    #[allow(deprecated, deprecated_in_future)]
     fn description(&self) -> &str {
         self.inner.description()
     }
@@ -550,7 +552,7 @@ fn description(&self) -> &str {
 ///   (including to an empty string).
 /// - If both do not exist, [`GetUserProfileDirectory`][msdn] is used to return the path.
 ///
-/// [msdn]: https://msdn.microsoft.com/en-us/library/windows/desktop/bb762280(v=vs.85).aspx
+/// [msdn]: https://docs.microsoft.com/en-us/windows/win32/api/userenv/nf-userenv-getuserprofiledirectorya
 ///
 /// # Examples
 ///
@@ -589,7 +591,7 @@ pub fn home_dir() -> Option<PathBuf> {
 /// This behavior is identical to that of [`GetTempPath`][msdn], which this
 /// function uses internally.
 ///
-/// [msdn]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa364992(v=vs.85).aspx
+/// [msdn]: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppatha
 ///
 /// ```no_run
 /// use std::env;
@@ -876,6 +878,7 @@ pub mod consts {
     /// - mips64
     /// - powerpc
     /// - powerpc64
+    /// - riscv64
     /// - s390x
     /// - sparc64
     #[stable(feature = "env", since = "1.0.0")]
@@ -1033,6 +1036,11 @@ mod arch {
     pub const ARCH: &'static str = "hexagon";
 }
 
+#[cfg(target_arch = "riscv64")]
+mod arch {
+    pub const ARCH: &'static str = "riscv64";
+}
+
 #[cfg(test)]
 mod tests {
     use super::*;