]> git.lizzy.rs Git - rust.git/commitdiff
std: Read HOME instead of USER
authorAlex Crichton <alex@alexcrichton.com>
Mon, 9 Jun 2014 19:44:45 +0000 (12:44 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 9 Jun 2014 19:44:45 +0000 (12:44 -0700)
Apparently one of the linux bots doesn't have the USER variable defined, and
this fix will likely land more quickly than a fix to the bots.

src/libstd/macros.rs

index 805da8021ed2c0cafd7af5ea0ec7e62b1441d26c..58f65c90b3b105fecb1dd98d79ee601a97a81deb 100644 (file)
@@ -425,8 +425,8 @@ macro_rules! format_args( ($closure:expr, $fmt:expr $($args:tt)*) => ({
     /// # Example
     ///
     /// ```rust
-    /// let user: &'static str = env!("USER");
-    /// println!("the user who compiled this code is: {}", user);
+    /// let home: &'static str = env!("HOME");
+    /// println!("the home directory at the time of compiling was: {}", home);
     /// ```
     #[macro_export]
     macro_rules! env( ($name:expr) => ({ /* compiler built-in */ }) )