@@ -68,21 +68,19 @@ pub fn set_current_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
68
68
69
69
/// An iterator over a snapshot of the environment variables of this process.
70
70
///
71
- /// This structure is created by the [`std::env::vars`] function. See its
72
- /// documentation for more.
71
+ /// This structure is created by [`env::vars()`]. See its documentation for more.
73
72
///
74
- /// [`std:: env::vars`]: vars
73
+ /// [`env::vars() `]: vars
75
74
#[ stable( feature = "env" , since = "1.0.0" ) ]
76
75
pub struct Vars {
77
76
inner : VarsOs ,
78
77
}
79
78
80
79
/// An iterator over a snapshot of the environment variables of this process.
81
80
///
82
- /// This structure is created by the [`std::env::vars_os`] function. See
83
- /// its documentation for more.
81
+ /// This structure is created by [`env::vars_os()`]. See its documentation for more.
84
82
///
85
- /// [`std:: env::vars_os`]: vars_os
83
+ /// [`env::vars_os() `]: vars_os
86
84
#[ stable( feature = "env" , since = "1.0.0" ) ]
87
85
pub struct VarsOs {
88
86
inner : os_imp:: Env ,
@@ -98,10 +96,8 @@ pub struct VarsOs {
98
96
/// # Panics
99
97
///
100
98
/// While iterating, the returned iterator will panic if any key or value in the
101
- /// environment is not valid unicode. If this is not desired, consider using the
102
- /// [`env::vars_os`] function.
103
- ///
104
- /// [`env::vars_os`]: vars_os
99
+ /// environment is not valid unicode. If this is not desired, consider using
100
+ /// [`env::vars_os()`].
105
101
///
106
102
/// # Examples
107
103
///
@@ -114,6 +110,8 @@ pub struct VarsOs {
114
110
/// println!("{}: {}", key, value);
115
111
/// }
116
112
/// ```
113
+ ///
114
+ /// [`env::vars_os()`]: vars_os
117
115
#[ stable( feature = "env" , since = "1.0.0" ) ]
118
116
pub fn vars ( ) -> Vars {
119
117
Vars { inner : vars_os ( ) }
@@ -245,9 +243,9 @@ fn _var_os(key: &OsStr) -> Option<OsString> {
245
243
}
246
244
247
245
/// The error type for operations interacting with environment variables.
248
- /// Possibly returned from the [`env::var`] function .
246
+ /// Possibly returned from [`env::var()`] .
249
247
///
250
- /// [`env::var`]: var
248
+ /// [`env::var() `]: var
251
249
#[ derive( Debug , PartialEq , Eq , Clone ) ]
252
250
#[ stable( feature = "env" , since = "1.0.0" ) ]
253
251
pub enum VarError {
@@ -372,10 +370,10 @@ fn _remove_var(k: &OsStr) {
372
370
///
373
371
/// The iterator element type is [`PathBuf`].
374
372
///
375
- /// This structure is created by the [`std:: env::split_paths`] function . See its
373
+ /// This structure is created by [` env::split_paths()`] . See its
376
374
/// documentation for more.
377
375
///
378
- /// [`std:: env::split_paths`]: split_paths
376
+ /// [`env::split_paths() `]: split_paths
379
377
#[ stable( feature = "env" , since = "1.0.0" ) ]
380
378
pub struct SplitPaths < ' a > {
381
379
inner : os_imp:: SplitPaths < ' a > ,
@@ -426,9 +424,9 @@ impl fmt::Debug for SplitPaths<'_> {
426
424
}
427
425
428
426
/// The error type for operations on the `PATH` variable. Possibly returned from
429
- /// the [`env::join_paths`] function .
427
+ /// [`env::join_paths()`] .
430
428
///
431
- /// [`env::join_paths`]: join_paths
429
+ /// [`env::join_paths() `]: join_paths
432
430
#[ derive( Debug ) ]
433
431
#[ stable( feature = "env" , since = "1.0.0" ) ]
434
432
pub struct JoinPathsError {
@@ -463,7 +461,8 @@ pub struct JoinPathsError {
463
461
/// }
464
462
/// ```
465
463
///
466
- /// Joining a path containing a colon on a Unix-like platform results in an error:
464
+ /// Joining a path containing a colon on a Unix-like platform results in an
465
+ /// error:
467
466
///
468
467
/// ```
469
468
/// # if cfg!(unix) {
@@ -475,8 +474,8 @@ pub struct JoinPathsError {
475
474
/// # }
476
475
/// ```
477
476
///
478
- /// Using `env::join_paths` with [`env::split_paths`] to append an item to the `PATH` environment
479
- /// variable:
477
+ /// Using `env::join_paths() ` with [`env::split_paths() `] to append an item to
478
+ /// the `PATH` environment variable:
480
479
///
481
480
/// ```
482
481
/// use std::env;
@@ -494,7 +493,7 @@ pub struct JoinPathsError {
494
493
/// }
495
494
/// ```
496
495
///
497
- /// [`env::split_paths`]: split_paths
496
+ /// [`env::split_paths() `]: split_paths
498
497
#[ stable( feature = "env" , since = "1.0.0" ) ]
499
498
pub fn join_paths < I , T > ( paths : I ) -> Result < OsString , JoinPathsError >
500
499
where
@@ -667,14 +666,14 @@ pub fn current_exe() -> io::Result<PathBuf> {
667
666
/// An iterator over the arguments of a process, yielding a [`String`] value for
668
667
/// each argument.
669
668
///
670
- /// This struct is created by the [`std:: env::args`] function . See its
671
- /// documentation for more.
669
+ /// This struct is created by [` env::args()`] . See its documentation
670
+ /// for more.
672
671
///
673
672
/// The first element is traditionally the path of the executable, but it can be
674
673
/// set to arbitrary text, and may not even exist. This means this property
675
674
/// should not be relied upon for security purposes.
676
675
///
677
- /// [`std:: env::args`]: args
676
+ /// [`env::args() `]: args
678
677
#[ stable( feature = "env" , since = "1.0.0" ) ]
679
678
pub struct Args {
680
679
inner : ArgsOs ,
@@ -683,14 +682,14 @@ pub struct Args {
683
682
/// An iterator over the arguments of a process, yielding an [`OsString`] value
684
683
/// for each argument.
685
684
///
686
- /// This struct is created by the [`std:: env::args_os`] function . See its
687
- /// documentation for more.
685
+ /// This struct is created by [` env::args_os()`] . See its documentation
686
+ /// for more.
688
687
///
689
688
/// The first element is traditionally the path of the executable, but it can be
690
689
/// set to arbitrary text, and may not even exist. This means this property
691
690
/// should not be relied upon for security purposes.
692
691
///
693
- /// [`std:: env::args_os`]: args_os
692
+ /// [`env::args_os() `]: args_os
694
693
#[ stable( feature = "env" , since = "1.0.0" ) ]
695
694
pub struct ArgsOs {
696
695
inner : sys:: args:: Args ,
0 commit comments