diff options
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/os/android/fs.rs | 2 | ||||
| -rw-r--r-- | library/std/src/os/dragonfly/fs.rs | 2 | ||||
| -rw-r--r-- | library/std/src/os/emscripten/fs.rs | 2 | ||||
| -rw-r--r-- | library/std/src/os/freebsd/fs.rs | 2 | ||||
| -rw-r--r-- | library/std/src/os/fuchsia/fs.rs | 2 | ||||
| -rw-r--r-- | library/std/src/os/haiku/fs.rs | 2 | ||||
| -rw-r--r-- | library/std/src/os/illumos/fs.rs | 2 | ||||
| -rw-r--r-- | library/std/src/os/ios/fs.rs | 2 | ||||
| -rw-r--r-- | library/std/src/os/linux/fs.rs | 4 | ||||
| -rw-r--r-- | library/std/src/os/macos/fs.rs | 2 | ||||
| -rw-r--r-- | library/std/src/os/netbsd/fs.rs | 2 | ||||
| -rw-r--r-- | library/std/src/os/openbsd/fs.rs | 2 | ||||
| -rw-r--r-- | library/std/src/os/redox/fs.rs | 4 | ||||
| -rw-r--r-- | library/std/src/os/solaris/fs.rs | 2 | ||||
| -rw-r--r-- | library/std/src/os/vxworks/fs.rs | 2 | ||||
| -rw-r--r-- | library/std/src/prelude/mod.rs | 83 | ||||
| -rw-r--r-- | library/std/src/time.rs | 33 |
17 files changed, 47 insertions, 103 deletions
diff --git a/library/std/src/os/android/fs.rs b/library/std/src/os/android/fs.rs index 9356e607c90..6aeef330dfa 100644 --- a/library/std/src/os/android/fs.rs +++ b/library/std/src/os/android/fs.rs @@ -8,7 +8,7 @@ use crate::os::android::raw; /// OS-specific extensions to [`fs::Metadata`]. /// -/// [`fs::Metadata`]: ../../../../std/fs/struct.Metadata.html +/// [`fs::Metadata`]: crate::fs::Metadata #[stable(feature = "metadata_ext", since = "1.1.0")] pub trait MetadataExt { /// Gain a reference to the underlying `stat` structure which contains diff --git a/library/std/src/os/dragonfly/fs.rs b/library/std/src/os/dragonfly/fs.rs index 8552abb1cb9..e4c4e04cd30 100644 --- a/library/std/src/os/dragonfly/fs.rs +++ b/library/std/src/os/dragonfly/fs.rs @@ -8,7 +8,7 @@ use crate::os::dragonfly::raw; /// OS-specific extensions to [`fs::Metadata`]. /// -/// [`fs::Metadata`]: ../../../../std/fs/struct.Metadata.html +/// [`fs::Metadata`]: crate::fs::Metadata #[stable(feature = "metadata_ext", since = "1.1.0")] pub trait MetadataExt { /// Gain a reference to the underlying `stat` structure which contains diff --git a/library/std/src/os/emscripten/fs.rs b/library/std/src/os/emscripten/fs.rs index f5e30dc8eef..d4f758a3457 100644 --- a/library/std/src/os/emscripten/fs.rs +++ b/library/std/src/os/emscripten/fs.rs @@ -8,7 +8,7 @@ use crate::os::emscripten::raw; /// OS-specific extensions to [`fs::Metadata`]. /// -/// [`fs::Metadata`]: ../../../../std/fs/struct.Metadata.html +/// [`fs::Metadata`]: crate::fs::Metadata #[stable(feature = "metadata_ext", since = "1.1.0")] pub trait MetadataExt { /// Gain a reference to the underlying `stat` structure which contains diff --git a/library/std/src/os/freebsd/fs.rs b/library/std/src/os/freebsd/fs.rs index 6798e0d8f44..c6a00e179bd 100644 --- a/library/std/src/os/freebsd/fs.rs +++ b/library/std/src/os/freebsd/fs.rs @@ -8,7 +8,7 @@ use crate::os::freebsd::raw; /// OS-specific extensions to [`fs::Metadata`]. /// -/// [`fs::Metadata`]: ../../../../std/fs/struct.Metadata.html +/// [`fs::Metadata`]: crate::fs::Metadata #[stable(feature = "metadata_ext", since = "1.1.0")] pub trait MetadataExt { /// Gain a reference to the underlying `stat` structure which contains diff --git a/library/std/src/os/fuchsia/fs.rs b/library/std/src/os/fuchsia/fs.rs index 1544bdfbe0c..b48a46f9124 100644 --- a/library/std/src/os/fuchsia/fs.rs +++ b/library/std/src/os/fuchsia/fs.rs @@ -5,7 +5,7 @@ use crate::sys_common::AsInner; /// OS-specific extensions to [`fs::Metadata`]. /// -/// [`fs::Metadata`]: ../../../../std/fs/struct.Metadata.html +/// [`fs::Metadata`]: crate::fs::Metadata #[stable(feature = "metadata_ext", since = "1.1.0")] pub trait MetadataExt { #[stable(feature = "metadata_ext2", since = "1.8.0")] diff --git a/library/std/src/os/haiku/fs.rs b/library/std/src/os/haiku/fs.rs index 13a4a92ae90..28015f62526 100644 --- a/library/std/src/os/haiku/fs.rs +++ b/library/std/src/os/haiku/fs.rs @@ -8,7 +8,7 @@ use crate::os::haiku::raw; /// OS-specific extensions to [`fs::Metadata`]. /// -/// [`fs::Metadata`]: ../../../../std/fs/struct.Metadata.html +/// [`fs::Metadata`]: crate::fs::Metadata #[stable(feature = "metadata_ext", since = "1.1.0")] pub trait MetadataExt { /// Gain a reference to the underlying `stat` structure which contains diff --git a/library/std/src/os/illumos/fs.rs b/library/std/src/os/illumos/fs.rs index b668aa2595d..021d154ff5a 100644 --- a/library/std/src/os/illumos/fs.rs +++ b/library/std/src/os/illumos/fs.rs @@ -8,7 +8,7 @@ use crate::os::illumos::raw; /// OS-specific extensions to [`fs::Metadata`]. /// -/// [`fs::Metadata`]: ../../../../std/fs/struct.Metadata.html +/// [`fs::Metadata`]: crate::fs::Metadata #[stable(feature = "metadata_ext", since = "1.1.0")] pub trait MetadataExt { /// Gain a reference to the underlying `stat` structure which contains diff --git a/library/std/src/os/ios/fs.rs b/library/std/src/os/ios/fs.rs index 08d3e4bcedf..2c5e38a803d 100644 --- a/library/std/src/os/ios/fs.rs +++ b/library/std/src/os/ios/fs.rs @@ -8,7 +8,7 @@ use crate::os::ios::raw; /// OS-specific extensions to [`fs::Metadata`]. /// -/// [`fs::Metadata`]: ../../../../std/fs/struct.Metadata.html +/// [`fs::Metadata`]: crate::fs::Metadata #[stable(feature = "metadata_ext", since = "1.1.0")] pub trait MetadataExt { /// Gain a reference to the underlying `stat` structure which contains diff --git a/library/std/src/os/linux/fs.rs b/library/std/src/os/linux/fs.rs index 657737394ab..cae65f12187 100644 --- a/library/std/src/os/linux/fs.rs +++ b/library/std/src/os/linux/fs.rs @@ -8,7 +8,7 @@ use crate::os::linux::raw; /// OS-specific extensions to [`fs::Metadata`]. /// -/// [`fs::Metadata`]: ../../../../std/fs/struct.Metadata.html +/// [`fs::Metadata`]: crate::fs::Metadata #[stable(feature = "metadata_ext", since = "1.1.0")] pub trait MetadataExt { /// Gain a reference to the underlying `stat` structure which contains @@ -18,7 +18,7 @@ pub trait MetadataExt { /// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the /// cross-Unix abstractions contained within the raw stat. /// - /// [`stat`]: ../../../../std/os/linux/raw/struct.stat.html + /// [`stat`]: crate::os::linux::raw::stat /// /// # Examples /// diff --git a/library/std/src/os/macos/fs.rs b/library/std/src/os/macos/fs.rs index ad313a1240d..4152c352936 100644 --- a/library/std/src/os/macos/fs.rs +++ b/library/std/src/os/macos/fs.rs @@ -8,7 +8,7 @@ use crate::os::macos::raw; /// OS-specific extensions to [`fs::Metadata`]. /// -/// [`fs::Metadata`]: ../../../../std/fs/struct.Metadata.html +/// [`fs::Metadata`]: crate::fs::Metadata #[stable(feature = "metadata_ext", since = "1.1.0")] pub trait MetadataExt { /// Gain a reference to the underlying `stat` structure which contains diff --git a/library/std/src/os/netbsd/fs.rs b/library/std/src/os/netbsd/fs.rs index 90980fdce80..6b29a40d2b5 100644 --- a/library/std/src/os/netbsd/fs.rs +++ b/library/std/src/os/netbsd/fs.rs @@ -8,7 +8,7 @@ use crate::os::netbsd::raw; /// OS-specific extensions to [`fs::Metadata`]. /// -/// [`fs::Metadata`]: ../../../../std/fs/struct.Metadata.html +/// [`fs::Metadata`]: crate::fs::Metadata #[stable(feature = "metadata_ext", since = "1.1.0")] pub trait MetadataExt { /// Gain a reference to the underlying `stat` structure which contains diff --git a/library/std/src/os/openbsd/fs.rs b/library/std/src/os/openbsd/fs.rs index 47da00ae26e..3143dc95fdf 100644 --- a/library/std/src/os/openbsd/fs.rs +++ b/library/std/src/os/openbsd/fs.rs @@ -8,7 +8,7 @@ use crate::os::openbsd::raw; /// OS-specific extensions to [`fs::Metadata`]. /// -/// [`fs::Metadata`]: ../../../../std/fs/struct.Metadata.html +/// [`fs::Metadata`]: crate::fs::Metadata #[stable(feature = "metadata_ext", since = "1.1.0")] pub trait MetadataExt { /// Gain a reference to the underlying `stat` structure which contains diff --git a/library/std/src/os/redox/fs.rs b/library/std/src/os/redox/fs.rs index 61b5bff3805..94d65651daa 100644 --- a/library/std/src/os/redox/fs.rs +++ b/library/std/src/os/redox/fs.rs @@ -8,7 +8,7 @@ use crate::os::redox::raw; /// OS-specific extensions to [`fs::Metadata`]. /// -/// [`fs::Metadata`]: ../../../../std/fs/struct.Metadata.html +/// [`fs::Metadata`]: crate::fs::Metadata #[stable(feature = "metadata_ext", since = "1.1.0")] pub trait MetadataExt { /// Gain a reference to the underlying `stat` structure which contains @@ -18,7 +18,7 @@ pub trait MetadataExt { /// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the /// cross-Unix abstractions contained within the raw stat. /// - /// [`stat`]: ../../../../std/os/redox/raw/struct.stat.html + /// [`stat`]: crate::os::redox::raw::stat /// /// # Examples /// diff --git a/library/std/src/os/solaris/fs.rs b/library/std/src/os/solaris/fs.rs index 549d3d75636..908c5c38a84 100644 --- a/library/std/src/os/solaris/fs.rs +++ b/library/std/src/os/solaris/fs.rs @@ -8,7 +8,7 @@ use crate::os::solaris::raw; /// OS-specific extensions to [`fs::Metadata`]. /// -/// [`fs::Metadata`]: ../../../../std/fs/struct.Metadata.html +/// [`fs::Metadata`]: crate::fs::Metadata #[stable(feature = "metadata_ext", since = "1.1.0")] pub trait MetadataExt { /// Gain a reference to the underlying `stat` structure which contains diff --git a/library/std/src/os/vxworks/fs.rs b/library/std/src/os/vxworks/fs.rs index 57ab4fb943e..5a7e5bcaa76 100644 --- a/library/std/src/os/vxworks/fs.rs +++ b/library/std/src/os/vxworks/fs.rs @@ -4,7 +4,7 @@ use crate::fs::Metadata; use crate::sys_common::AsInner; /// -/// [`fs::Metadata`]: ../../../../std/fs/struct.Metadata.html +/// [`fs::Metadata`]: crate::fs::Metadata #[stable(feature = "metadata_ext", since = "1.1.0")] pub trait MetadataExt { #[stable(feature = "metadata_ext2", since = "1.8.0")] diff --git a/library/std/src/prelude/mod.rs b/library/std/src/prelude/mod.rs index 48f7cf16988..710c616be73 100644 --- a/library/std/src/prelude/mod.rs +++ b/library/std/src/prelude/mod.rs @@ -17,7 +17,7 @@ //! such as [`std::io::prelude`]. Various libraries in the Rust ecosystem may //! also define their own preludes. //! -//! [`std::io::prelude`]: ../io/prelude/index.html +//! [`std::io::prelude`]: crate::io::prelude //! //! The difference between 'the prelude' and these other preludes is that they //! are not automatically `use`'d, and must be imported manually. This is still @@ -49,67 +49,34 @@ //! * [`std::iter`]::{[`Iterator`], [`Extend`], [`IntoIterator`], //! [`DoubleEndedIterator`], [`ExactSizeIterator`]}. Iterators of various //! kinds. -//! * [`std::option`]::[`Option`]::{`self`, `Some`, `None`}. A type which -//! expresses the presence or absence of a value. This type is so commonly -//! used, its variants are also exported. -//! * [`std::result`]::[`Result`]::{`self`, `Ok`, `Err`}. A type for functions -//! that may succeed or fail. Like [`Option`], its variants are exported as -//! well. +//! * [`std::option`]::[`Option`]::{[`self`][`Option`], [`Some`], [`None`]}. A +//! type which expresses the presence or absence of a value. This type is so +//! commonly used, its variants are also exported. +//! * [`std::result`]::[`Result`]::{[`self`][`Result`], [`Ok`], [`Err`]}. A type +//! for functions that may succeed or fail. Like [`Option`], its variants are +//! exported as well. //! * [`std::string`]::{[`String`], [`ToString`]}, heap allocated strings. -//! * [`std::vec`]::[`Vec`](../vec/struct.Vec.html), a growable, heap-allocated +//! * [`std::vec`]::[`Vec`], a growable, heap-allocated //! vector. //! -//! [`AsMut`]: ../convert/trait.AsMut.html -//! [`AsRef`]: ../convert/trait.AsRef.html -//! [`Box`]: ../boxed/struct.Box.html -//! [`Clone`]: ../clone/trait.Clone.html -//! [`Copy`]: ../marker/trait.Copy.html -//! [`Default`]: ../default/trait.Default.html -//! [`DoubleEndedIterator`]: ../iter/trait.DoubleEndedIterator.html -//! [`Drop`]: ../ops/trait.Drop.html -//! [`Eq`]: ../cmp/trait.Eq.html -//! [`ExactSizeIterator`]: ../iter/trait.ExactSizeIterator.html -//! [`Extend`]: ../iter/trait.Extend.html -//! [`FnMut`]: ../ops/trait.FnMut.html -//! [`FnOnce`]: ../ops/trait.FnOnce.html -//! [`Fn`]: ../ops/trait.Fn.html -//! [`From`]: ../convert/trait.From.html -//! [`IntoIterator`]: ../iter/trait.IntoIterator.html -//! [`Into`]: ../convert/trait.Into.html -//! [`Iterator`]: ../iter/trait.Iterator.html -//! [`Option`]: ../option/enum.Option.html -//! [`Ord`]: ../cmp/trait.Ord.html -//! [`PartialEq`]: ../cmp/trait.PartialEq.html -//! [`PartialOrd`]: ../cmp/trait.PartialOrd.html -//! [`Result`]: ../result/enum.Result.html -//! [`Send`]: ../marker/trait.Send.html -//! [`Sized`]: ../marker/trait.Sized.html -//! [`SliceConcatExt`]: ../slice/trait.SliceConcatExt.html -//! [`String`]: ../string/struct.String.html -//! [`Sync`]: ../marker/trait.Sync.html -//! [`ToOwned`]: ../borrow/trait.ToOwned.html -//! [`ToString`]: ../string/trait.ToString.html -//! [`Unpin`]: ../marker/trait.Unpin.html -//! [`Vec`]: ../vec/struct.Vec.html -//! [`Clone::clone`]: ../clone/trait.Clone.html#tymethod.clone -//! [`mem::drop`]: ../mem/fn.drop.html -//! [`std::borrow`]: ../borrow/index.html -//! [`std::boxed`]: ../boxed/index.html -//! [`std::clone`]: ../clone/index.html -//! [`std::cmp`]: ../cmp/index.html -//! [`std::convert`]: ../convert/index.html -//! [`std::default`]: ../default/index.html -//! [`std::iter`]: ../iter/index.html -//! [`std::marker`]: ../marker/index.html -//! [`std::mem`]: ../mem/index.html -//! [`std::ops`]: ../ops/index.html -//! [`std::option`]: ../option/index.html -//! [`std::prelude::v1`]: v1/index.html -//! [`std::result`]: ../result/index.html -//! [`std::slice`]: ../slice/index.html -//! [`std::string`]: ../string/index.html +//! [`mem::drop`]: crate::mem::drop +//! [`std::borrow`]: crate::borrow +//! [`std::boxed`]: crate::boxed +//! [`std::clone`]: crate::clone +//! [`std::cmp`]: crate::cmp +//! [`std::convert`]: crate::convert +//! [`std::default`]: crate::default +//! [`std::iter`]: crate::iter +//! [`std::marker`]: crate::marker +//! [`std::mem`]: crate::mem +//! [`std::ops`]: crate::ops +//! [`std::option`]: crate::option +//! [`std::prelude::v1`]: v1 +//! [`std::result`]: crate::result +//! [`std::slice`]: crate::slice +//! [`std::string`]: crate::string //! [`std::vec`]: ../vec/index.html -//! [`to_owned`]: ../borrow/trait.ToOwned.html#tymethod.to_owned +//! [`to_owned`]: crate::borrow::ToOwned::to_owned //! [book-closures]: ../../book/ch13-01-closures.html //! [book-dtor]: ../../book/ch15-03-drop.html //! [book-enums]: ../../book/ch06-01-defining-an-enum.html diff --git a/library/std/src/time.rs b/library/std/src/time.rs index 9f4fa89cd55..969c442884d 100644 --- a/library/std/src/time.rs +++ b/library/std/src/time.rs @@ -97,7 +97,6 @@ pub use core::time::Duration; /// [clock_time_get (Monotonic Clock)]: https://nuxi.nl/cloudabi/#clock_time_get /// /// **Disclaimer:** These system calls might change over time. -/// #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[stable(feature = "time2", since = "1.8.0")] pub struct Instant(time::Instant); @@ -125,11 +124,6 @@ pub struct Instant(time::Instant); /// The size of a `SystemTime` struct may vary depending on the target operating /// system. /// -/// [`Instant`]: ../../std/time/struct.Instant.html -/// [`Result`]: ../../std/result/enum.Result.html -/// [`Duration`]: ../../std/time/struct.Duration.html -/// [`UNIX_EPOCH`]: ../../std/time/constant.UNIX_EPOCH.html -/// /// Example: /// /// ```no_run @@ -176,7 +170,6 @@ pub struct Instant(time::Instant); /// [GetSystemTimeAsFileTime]: https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsystemtimeasfiletime /// /// **Disclaimer:** These system calls might change over time. -/// #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[stable(feature = "time2", since = "1.8.0")] pub struct SystemTime(time::SystemTime); @@ -368,7 +361,7 @@ impl Add<Duration> for Instant { /// This function may panic if the resulting point in time cannot be represented by the /// underlying data structure. See [`checked_add`] for a version without panic. /// - /// [`checked_add`]: ../../std/time/struct.Instant.html#method.checked_add + /// [`checked_add`]: Instant::checked_add fn add(self, other: Duration) -> Instant { self.checked_add(other).expect("overflow when adding duration to instant") } @@ -463,11 +456,6 @@ impl SystemTime { /// Returns an [`Err`] if `earlier` is later than `self`, and the error /// contains how far from `self` the time is. /// - /// [`Ok`]: ../../std/result/enum.Result.html#variant.Ok - /// [`Duration`]: ../../std/time/struct.Duration.html - /// [`Err`]: ../../std/result/enum.Result.html#variant.Err - /// [`Instant`]: ../../std/time/struct.Instant.html - /// /// # Examples /// /// ``` @@ -497,11 +485,6 @@ impl SystemTime { /// Returns an [`Err`] if `self` is later than the current system time, and /// the error contains how far from the current system time `self` is. /// - /// [`Ok`]: ../../std/result/enum.Result.html#variant.Ok - /// [`Duration`]: ../../std/time/struct.Duration.html - /// [`Err`]: ../../std/result/enum.Result.html#variant.Err - /// [`Instant`]: ../../std/time/struct.Instant.html - /// /// # Examples /// /// ```no_run @@ -544,7 +527,7 @@ impl Add<Duration> for SystemTime { /// This function may panic if the resulting point in time cannot be represented by the /// underlying data structure. See [`checked_add`] for a version without panic. /// - /// [`checked_add`]: ../../std/time/struct.SystemTime.html#method.checked_add + /// [`checked_add`]: SystemTime::checked_add fn add(self, dur: Duration) -> SystemTime { self.checked_add(dur).expect("overflow when adding duration to instant") } @@ -589,8 +572,6 @@ impl fmt::Debug for SystemTime { /// measurement lies, and using `UNIX_EPOCH + duration` can be used to create a /// [`SystemTime`] instance to represent another fixed point in time. /// -/// [`SystemTime`]: ../../std/time/struct.SystemTime.html -/// /// # Examples /// /// ```no_run @@ -608,13 +589,9 @@ impl SystemTimeError { /// Returns the positive duration which represents how far forward the /// second system time was from the first. /// - /// A `SystemTimeError` is returned from the [`duration_since`] and [`elapsed`] - /// methods of [`SystemTime`] whenever the second system time represents a point later - /// in time than the `self` of the method call. - /// - /// [`duration_since`]: ../../std/time/struct.SystemTime.html#method.duration_since - /// [`elapsed`]: ../../std/time/struct.SystemTime.html#method.elapsed - /// [`SystemTime`]: ../../std/time/struct.SystemTime.html + /// A `SystemTimeError` is returned from the [`SystemTime::duration_since`] + /// and [`SystemTime::elapsed`] methods whenever the second system time + /// represents a point later in time than the `self` of the method call. /// /// # Examples /// |
