Skip to content

Commit a7872b3

Browse files
committed
std: Read HOME instead of USER
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.
1 parent e55f64f commit a7872b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libstd/macros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,8 @@ pub mod builtin {
425425
/// # Example
426426
///
427427
/// ```rust
428-
/// let user: &'static str = env!("USER");
429-
/// println!("the user who compiled this code is: {}", user);
428+
/// let home: &'static str = env!("HOME");
429+
/// println!("the home directory at the time of compiling was: {}", home);
430430
/// ```
431431
#[macro_export]
432432
macro_rules! env( ($name:expr) => ({ /* compiler built-in */ }) )

0 commit comments

Comments
 (0)