diff options
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/ascii.rs | 2 | ||||
| -rw-r--r-- | library/std/src/fs.rs | 30 | ||||
| -rw-r--r-- | library/std/src/net/addr.rs | 4 | ||||
| -rw-r--r-- | library/std/src/net/ip.rs | 42 | ||||
| -rw-r--r-- | library/std/src/prelude/mod.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/unix/ext/fs.rs | 7 |
6 files changed, 21 insertions, 66 deletions
diff --git a/library/std/src/ascii.rs b/library/std/src/ascii.rs index c9106136d34..035cd9f243b 100644 --- a/library/std/src/ascii.rs +++ b/library/std/src/ascii.rs @@ -70,7 +70,6 @@ pub trait AsciiExt { /// inherent methods on `u8`, `char`, `[u8]` and `str`. /// /// [`make_ascii_uppercase`]: AsciiExt::make_ascii_uppercase - /// [`str::to_uppercase`]: ../primitive.str.html#method.to_uppercase #[stable(feature = "rust1", since = "1.0.0")] #[allow(deprecated)] fn to_ascii_uppercase(&self) -> Self::Owned; @@ -91,7 +90,6 @@ pub trait AsciiExt { /// inherent methods on `u8`, `char`, `[u8]` and `str`. /// /// [`make_ascii_lowercase`]: AsciiExt::make_ascii_lowercase - /// [`str::to_lowercase`]: ../primitive.str.html#method.to_lowercase #[stable(feature = "rust1", since = "1.0.0")] #[allow(deprecated)] fn to_ascii_lowercase(&self) -> Self::Owned; diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index 3cfb6bc9d3d..161bfe3795c 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -553,7 +553,7 @@ impl File { /// the `SetFileInformationByHandle` function on Windows. Note that, this /// [may change in the future][changes]. /// - /// [changes]: ../io/index.html#platform-specific-behavior + /// [changes]: io#platform-specific-behavior /// /// # Errors /// @@ -1503,7 +1503,7 @@ impl AsInner<fs_imp::DirEntry> for DirEntry { /// and the `DeleteFile` function on Windows. /// Note that, this [may change in the future][changes]. /// -/// [changes]: ../io/index.html#platform-specific-behavior +/// [changes]: io#platform-specific-behavior /// /// # Errors /// @@ -1541,7 +1541,7 @@ pub fn remove_file<P: AsRef<Path>>(path: P) -> io::Result<()> { /// and the `GetFileAttributesEx` function on Windows. /// Note that, this [may change in the future][changes]. /// -/// [changes]: ../io/index.html#platform-specific-behavior +/// [changes]: io#platform-specific-behavior /// /// # Errors /// @@ -1575,7 +1575,7 @@ pub fn metadata<P: AsRef<Path>>(path: P) -> io::Result<Metadata> { /// and the `GetFileAttributesEx` function on Windows. /// Note that, this [may change in the future][changes]. /// -/// [changes]: ../io/index.html#platform-specific-behavior +/// [changes]: io#platform-specific-behavior /// /// # Errors /// @@ -1618,7 +1618,7 @@ pub fn symlink_metadata<P: AsRef<Path>>(path: P) -> io::Result<Metadata> { /// /// Note that, this [may change in the future][changes]. /// -/// [changes]: ../io/index.html#platform-specific-behavior +/// [changes]: io#platform-specific-behavior /// /// # Errors /// @@ -1669,7 +1669,7 @@ pub fn rename<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<()> /// `fcopyfile`. /// Note that, this [may change in the future][changes]. /// -/// [changes]: ../io/index.html#platform-specific-behavior +/// [changes]: io#platform-specific-behavior /// /// # Errors /// @@ -1707,7 +1707,7 @@ pub fn copy<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<u64> { /// and the `CreateHardLink` function on Windows. /// Note that, this [may change in the future][changes]. /// -/// [changes]: ../io/index.html#platform-specific-behavior +/// [changes]: io#platform-specific-behavior /// /// # Errors /// @@ -1772,7 +1772,7 @@ pub fn soft_link<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> io::Result<( /// `FILE_FLAG_BACKUP_SEMANTICS` flags on Windows. /// Note that, this [may change in the future][changes]. /// -/// [changes]: ../io/index.html#platform-specific-behavior +/// [changes]: io#platform-specific-behavior /// /// # Errors /// @@ -1812,7 +1812,7 @@ pub fn read_link<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> { /// with other applications (if passed to the application on the command-line, /// or written to a file another application may read). /// -/// [changes]: ../io/index.html#platform-specific-behavior +/// [changes]: io#platform-specific-behavior /// [path]: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file /// /// # Errors @@ -1846,7 +1846,7 @@ pub fn canonicalize<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> { /// and the `CreateDirectory` function on Windows. /// Note that, this [may change in the future][changes]. /// -/// [changes]: ../io/index.html#platform-specific-behavior +/// [changes]: io#platform-specific-behavior /// /// **NOTE**: If a parent of the given path doesn't exist, this function will /// return an error. To create a directory and all its missing parents at the @@ -1887,7 +1887,7 @@ pub fn create_dir<P: AsRef<Path>>(path: P) -> io::Result<()> { /// and the `CreateDirectory` function on Windows. /// Note that, this [may change in the future][changes]. /// -/// [changes]: ../io/index.html#platform-specific-behavior +/// [changes]: io#platform-specific-behavior /// /// # Errors /// @@ -1930,7 +1930,7 @@ pub fn create_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> { /// and the `RemoveDirectory` function on Windows. /// Note that, this [may change in the future][changes]. /// -/// [changes]: ../io/index.html#platform-specific-behavior +/// [changes]: io#platform-specific-behavior /// /// # Errors /// @@ -1970,7 +1970,7 @@ pub fn remove_dir<P: AsRef<Path>>(path: P) -> io::Result<()> { /// on Windows. /// Note that, this [may change in the future][changes]. /// -/// [changes]: ../io/index.html#platform-specific-behavior +/// [changes]: io#platform-specific-behavior /// /// # Errors /// @@ -2006,7 +2006,7 @@ pub fn remove_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> { /// currently corresponds to `readdir` on Unix and `FindNextFile` on Windows. /// Note that, this [may change in the future][changes]. /// -/// [changes]: ../io/index.html#platform-specific-behavior +/// [changes]: io#platform-specific-behavior /// /// The order in which this iterator returns entries is platform and filesystem /// dependent. @@ -2075,7 +2075,7 @@ pub fn read_dir<P: AsRef<Path>>(path: P) -> io::Result<ReadDir> { /// and the `SetFileAttributes` function on Windows. /// Note that, this [may change in the future][changes]. /// -/// [changes]: ../io/index.html#platform-specific-behavior +/// [changes]: io#platform-specific-behavior /// /// # Errors /// diff --git a/library/std/src/net/addr.rs b/library/std/src/net/addr.rs index 1ba243804fe..499b1137dcb 100644 --- a/library/std/src/net/addr.rs +++ b/library/std/src/net/addr.rs @@ -213,8 +213,6 @@ impl SocketAddr { /// /// [IP address]: IpAddr /// [`IPv4` address]: IpAddr::V4 - /// [`false`]: ../../std/primitive.bool.html - /// [`true`]: ../../std/primitive.bool.html /// /// # Examples /// @@ -235,8 +233,6 @@ impl SocketAddr { /// /// [IP address]: IpAddr /// [`IPv6` address]: IpAddr::V6 - /// [`false`]: ../../std/primitive.bool.html - /// [`true`]: ../../std/primitive.bool.html /// /// # Examples /// diff --git a/library/std/src/net/ip.rs b/library/std/src/net/ip.rs index 3f9afae880f..e2fc7edb87e 100644 --- a/library/std/src/net/ip.rs +++ b/library/std/src/net/ip.rs @@ -140,8 +140,6 @@ impl IpAddr { /// See the documentation for [`Ipv4Addr::is_unspecified()`] and /// [`Ipv6Addr::is_unspecified()`] for more details. /// - /// [`true`]: ../../std/primitive.bool.html - /// /// # Examples /// /// ``` @@ -163,8 +161,6 @@ impl IpAddr { /// See the documentation for [`Ipv4Addr::is_loopback()`] and /// [`Ipv6Addr::is_loopback()`] for more details. /// - /// [`true`]: ../../std/primitive.bool.html - /// /// # Examples /// /// ``` @@ -186,8 +182,6 @@ impl IpAddr { /// See the documentation for [`Ipv4Addr::is_global()`] and /// [`Ipv6Addr::is_global()`] for more details. /// - /// [`true`]: ../../std/primitive.bool.html - /// /// # Examples /// /// ``` @@ -210,8 +204,6 @@ impl IpAddr { /// See the documentation for [`Ipv4Addr::is_multicast()`] and /// [`Ipv6Addr::is_multicast()`] for more details. /// - /// [`true`]: ../../std/primitive.bool.html - /// /// # Examples /// /// ``` @@ -233,8 +225,6 @@ impl IpAddr { /// See the documentation for [`Ipv4Addr::is_documentation()`] and /// [`Ipv6Addr::is_documentation()`] for more details. /// - /// [`true`]: ../../std/primitive.bool.html - /// /// # Examples /// /// ``` @@ -258,8 +248,6 @@ impl IpAddr { /// Returns [`true`] if this address is an [`IPv4` address], and [`false`] /// otherwise. /// - /// [`true`]: ../../std/primitive.bool.html - /// [`false`]: ../../std/primitive.bool.html /// [`IPv4` address]: IpAddr::V4 /// /// # Examples @@ -278,8 +266,6 @@ impl IpAddr { /// Returns [`true`] if this address is an [`IPv6` address], and [`false`] /// otherwise. /// - /// [`true`]: ../../std/primitive.bool.html - /// [`false`]: ../../std/primitive.bool.html /// [`IPv6` address]: IpAddr::V6 /// /// # Examples @@ -377,7 +363,6 @@ impl Ipv4Addr { /// This property is defined in _UNIX Network Programming, Second Edition_, /// W. Richard Stevens, p. 891; see also [ip7]. /// - /// [`true`]: ../../std/primitive.bool.html /// [ip7]: http://man7.org/linux/man-pages/man7/ip.7.html /// /// # Examples @@ -398,7 +383,6 @@ impl Ipv4Addr { /// /// This property is defined by [IETF RFC 1122]. /// - /// [`true`]: ../../std/primitive.bool.html /// [IETF RFC 1122]: https://tools.ietf.org/html/rfc1122 /// /// # Examples @@ -423,7 +407,6 @@ impl Ipv4Addr { /// - 172.16.0.0/12 /// - 192.168.0.0/16 /// - /// [`true`]: ../../std/primitive.bool.html /// [IETF RFC 1918]: https://tools.ietf.org/html/rfc1918 /// /// # Examples @@ -454,7 +437,6 @@ impl Ipv4Addr { /// /// This property is defined by [IETF RFC 3927]. /// - /// [`true`]: ../../std/primitive.bool.html /// [IETF RFC 3927]: https://tools.ietf.org/html/rfc3927 /// /// # Examples @@ -494,8 +476,6 @@ impl Ipv4Addr { /// - addresses reserved for networking devices benchmarking (see /// [`Ipv4Addr::is_benchmarking()`]) /// - /// [`true`]: ../../std/primitive.bool.html - /// [`false`]: ../../std/primitive.bool.html /// [ipv4-sr]: https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml /// /// # Examples @@ -571,7 +551,6 @@ impl Ipv4Addr { /// Returns [`true`] if this address is part of the Shared Address Space defined in /// [IETF RFC 6598] (`100.64.0.0/10`). /// - /// [`true`]: ../../std/primitive.bool.html /// [IETF RFC 6598]: https://tools.ietf.org/html/rfc6598 /// /// # Examples @@ -598,7 +577,6 @@ impl Ipv4Addr { /// - `192.0.0.9/32` is the "Port Control Protocol Anycast" (see [IETF RFC 7723]) /// - `192.0.0.10/32` is used for NAT traversal (see [IETF RFC 8155]) /// - /// [`true`]: ../../std/primitive.bool.html /// [IETF RFC 6890]: https://tools.ietf.org/html/rfc6890 /// [IETF RFC 7600]: https://tools.ietf.org/html/rfc7600 /// [IETF RFC 7723]: https://tools.ietf.org/html/rfc7723 @@ -626,7 +604,6 @@ impl Ipv4Addr { /// network devices benchmarking. This range is defined in [IETF RFC 2544] as `192.18.0.0` /// through `198.19.255.255` but [errata 423] corrects it to `198.18.0.0/15`. /// - /// [`true`]: ../../std/primitive.bool.html /// [IETF RFC 2544]: https://tools.ietf.org/html/rfc2544 /// [errata 423]: https://www.rfc-editor.org/errata/eid423 /// @@ -651,7 +628,6 @@ impl Ipv4Addr { /// broadcast address `255.255.255.255`, but this implementation explicitly excludes it, since /// it is obviously not reserved for future use. /// - /// [`true`]: ../../std/primitive.bool.html /// [IETF RFC 1112]: https://tools.ietf.org/html/rfc1112 /// /// # Warning @@ -684,7 +660,6 @@ impl Ipv4Addr { /// Multicast addresses have a most significant octet between 224 and 239, /// and is defined by [IETF RFC 5771]. /// - /// [`true`]: ../../std/primitive.bool.html /// [IETF RFC 5771]: https://tools.ietf.org/html/rfc5771 /// /// # Examples @@ -706,7 +681,6 @@ impl Ipv4Addr { /// /// A broadcast address has all octets set to 255 as defined in [IETF RFC 919]. /// - /// [`true`]: ../../std/primitive.bool.html /// [IETF RFC 919]: https://tools.ietf.org/html/rfc919 /// /// # Examples @@ -731,7 +705,6 @@ impl Ipv4Addr { /// - 198.51.100.0/24 (TEST-NET-2) /// - 203.0.113.0/24 (TEST-NET-3) /// - /// [`true`]: ../../std/primitive.bool.html /// [IETF RFC 5737]: https://tools.ietf.org/html/rfc5737 /// /// # Examples @@ -1148,7 +1121,6 @@ impl Ipv6Addr { /// /// This property is defined in [IETF RFC 4291]. /// - /// [`true`]: ../../std/primitive.bool.html /// [IETF RFC 4291]: https://tools.ietf.org/html/rfc4291 /// /// # Examples @@ -1169,7 +1141,6 @@ impl Ipv6Addr { /// /// This property is defined in [IETF RFC 4291]. /// - /// [`true`]: ../../std/primitive.bool.html /// [IETF RFC 4291]: https://tools.ietf.org/html/rfc4291 /// /// # Examples @@ -1194,9 +1165,6 @@ impl Ipv6Addr { /// - link-local and unique local unicast addresses /// - interface-, link-, realm-, admin- and site-local multicast addresses /// - /// [`true`]: ../../std/primitive.bool.html - /// [`false`]: ../../std/primitive.bool.html - /// /// # Examples /// /// ``` @@ -1223,8 +1191,6 @@ impl Ipv6Addr { /// /// [IETF RFC 4193]: https://tools.ietf.org/html/rfc4193 /// - /// [`true`]: ../../std/primitive.bool.html - /// /// # Examples /// /// ``` @@ -1257,8 +1223,6 @@ impl Ipv6Addr { /// addresses such as `fe80:0:0:1::` or `fe81::` as unicast link-local addresses for example. /// If you need a less strict validation use [`Ipv6Addr::is_unicast_link_local()`] instead. /// - /// [`true`]: ../../std/primitive.bool.html - /// /// # Examples /// /// ``` @@ -1317,8 +1281,6 @@ impl Ipv6Addr { /// If you need a strict validation fully compliant with the RFC, use /// [`Ipv6Addr::is_unicast_link_local_strict()`] instead. /// - /// [`true`]: ../../std/primitive.bool.html - /// /// # Examples /// /// ``` @@ -1365,7 +1327,6 @@ impl Ipv6Addr { /// +----------+-------------------------+----------------------------+ /// ``` /// - /// [`true`]: ../../std/primitive.bool.html /// [RFC 4291 section 2.5.7]: https://tools.ietf.org/html/rfc4291#section-2.5.7 /// /// # Examples @@ -1399,7 +1360,6 @@ impl Ipv6Addr { /// /// This property is defined in [IETF RFC 3849]. /// - /// [`true`]: ../../std/primitive.bool.html /// [IETF RFC 3849]: https://tools.ietf.org/html/rfc3849 /// /// # Examples @@ -1435,7 +1395,6 @@ impl Ipv6Addr { /// Global Unicast). /// ``` /// - /// [`true`]: ../../std/primitive.bool.html /// [RFC 4291 section 2.5.7]: https://tools.ietf.org/html/rfc4291#section-2.5.7 /// /// # Examples @@ -1495,7 +1454,6 @@ impl Ipv6Addr { /// /// This property is defined by [IETF RFC 4291]. /// - /// [`true`]: ../../std/primitive.bool.html /// [IETF RFC 4291]: https://tools.ietf.org/html/rfc4291 /// /// # Examples diff --git a/library/std/src/prelude/mod.rs b/library/std/src/prelude/mod.rs index 710c616be73..c7a7c779d3c 100644 --- a/library/std/src/prelude/mod.rs +++ b/library/std/src/prelude/mod.rs @@ -75,7 +75,7 @@ //! [`std::result`]: crate::result //! [`std::slice`]: crate::slice //! [`std::string`]: crate::string -//! [`std::vec`]: ../vec/index.html +//! [`std::vec`]: mod@crate::vec //! [`to_owned`]: crate::borrow::ToOwned::to_owned //! [book-closures]: ../../book/ch13-01-closures.html //! [book-dtor]: ../../book/ch15-03-drop.html diff --git a/library/std/src/sys/unix/ext/fs.rs b/library/std/src/sys/unix/ext/fs.rs index b590a0280d1..e48e950928a 100644 --- a/library/std/src/sys/unix/ext/fs.rs +++ b/library/std/src/sys/unix/ext/fs.rs @@ -8,6 +8,9 @@ use crate::path::Path; use crate::sys; use crate::sys::platform::fs::MetadataExt as UnixMetadataExt; use crate::sys_common::{AsInner, AsInnerMut, FromInner}; +// Used for `File::read` on intra-doc links +#[allow(unused_imports)] +use io::{Read, Write}; /// Unix-specific extensions to [`fs::File`]. #[stable(feature = "file_offset", since = "1.15.0")] @@ -24,7 +27,7 @@ pub trait FileExt { /// Note that similar to [`File::read`], it is not an error to return with a /// short read. /// - /// [`File::read`]: ../../../../std/fs/struct.File.html#method.read + /// [`File::read`]: fs::File::read /// /// # Examples /// @@ -127,7 +130,7 @@ pub trait FileExt { /// Note that similar to [`File::write`], it is not an error to return a /// short write. /// - /// [`File::write`]: ../../../../std/fs/struct.File.html#method.write + /// [`File::write`]: fs::File::write /// /// # Examples /// |
