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