Skip to content

Commit 474d340

Browse files
committed
Use PATH instead of HOME in env! example
HOME does not exist under typical windows environments.
1 parent 4bb4a43 commit 474d340

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
@@ -434,8 +434,8 @@ pub mod builtin {
434434
/// # Example
435435
///
436436
/// ```rust
437-
/// let home: &'static str = env!("HOME");
438-
/// println!("the home directory at the time of compiling was: {}", home);
437+
/// let path: &'static str = env!("PATH");
438+
/// println!("the $PATH variable at the time of compiling was: {}", path);
439439
/// ```
440440
#[macro_export]
441441
macro_rules! env( ($name:expr) => ({ /* compiler built-in */ }) )

0 commit comments

Comments
 (0)