Skip to content

Commit 08deb86

Browse files
committedSep 3, 2020
Auto merge of #76235 - jyn514:std-intra-links, r=poliorcetics
Convert many files to intra-doc links Helps with #75080 r? @poliorcetics I recommend reviewing one commit at a time, but the diff is small enough you can do it all at once if you like :)
2 parents 1e33c74 + bb10347 commit 08deb86

File tree

10 files changed

+34
-79
lines changed

10 files changed

+34
-79
lines changed
 

‎library/alloc/src/boxed.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ impl<T> Box<T> {
217217
/// assert_eq!(*zero, 0)
218218
/// ```
219219
///
220-
/// [zeroed]: ../../std/mem/union.MaybeUninit.html#method.zeroed
220+
/// [zeroed]: mem::MaybeUninit::zeroed
221221
#[unstable(feature = "new_uninit", issue = "63291")]
222222
pub fn new_zeroed() -> Box<mem::MaybeUninit<T>> {
223223
let layout = alloc::Layout::new::<mem::MaybeUninit<T>>();
@@ -289,7 +289,7 @@ impl<T> Box<[T]> {
289289
/// assert_eq!(*values, [0, 0, 0])
290290
/// ```
291291
///
292-
/// [zeroed]: ../../std/mem/union.MaybeUninit.html#method.zeroed
292+
/// [zeroed]: mem::MaybeUninit::zeroed
293293
#[unstable(feature = "new_uninit", issue = "63291")]
294294
pub fn new_zeroed_slice(len: usize) -> Box<[mem::MaybeUninit<T>]> {
295295
unsafe { RawVec::with_capacity_zeroed(len).into_box(len) }
@@ -307,7 +307,7 @@ impl<T> Box<mem::MaybeUninit<T>> {
307307
/// Calling this when the content is not yet fully initialized
308308
/// causes immediate undefined behavior.
309309
///
310-
/// [`MaybeUninit::assume_init`]: ../../std/mem/union.MaybeUninit.html#method.assume_init
310+
/// [`MaybeUninit::assume_init`]: mem::MaybeUninit::assume_init
311311
///
312312
/// # Examples
313313
///
@@ -343,7 +343,7 @@ impl<T> Box<[mem::MaybeUninit<T>]> {
343343
/// Calling this when the content is not yet fully initialized
344344
/// causes immediate undefined behavior.
345345
///
346-
/// [`MaybeUninit::assume_init`]: ../../std/mem/union.MaybeUninit.html#method.assume_init
346+
/// [`MaybeUninit::assume_init`]: mem::MaybeUninit::assume_init
347347
///
348348
/// # Examples
349349
///

‎library/alloc/src/rc.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ impl<T> Rc<T> {
376376
/// assert_eq!(*zero, 0)
377377
/// ```
378378
///
379-
/// [zeroed]: ../../std/mem/union.MaybeUninit.html#method.zeroed
379+
/// [zeroed]: mem::MaybeUninit::zeroed
380380
#[unstable(feature = "new_uninit", issue = "63291")]
381381
pub fn new_zeroed() -> Rc<mem::MaybeUninit<T>> {
382382
unsafe {
@@ -484,7 +484,7 @@ impl<T> Rc<[T]> {
484484
/// assert_eq!(*values, [0, 0, 0])
485485
/// ```
486486
///
487-
/// [zeroed]: ../../std/mem/union.MaybeUninit.html#method.zeroed
487+
/// [zeroed]: mem::MaybeUninit::zeroed
488488
#[unstable(feature = "new_uninit", issue = "63291")]
489489
pub fn new_zeroed_slice(len: usize) -> Rc<[mem::MaybeUninit<T>]> {
490490
unsafe {
@@ -511,7 +511,7 @@ impl<T> Rc<mem::MaybeUninit<T>> {
511511
/// Calling this when the content is not yet fully initialized
512512
/// causes immediate undefined behavior.
513513
///
514-
/// [`MaybeUninit::assume_init`]: ../../std/mem/union.MaybeUninit.html#method.assume_init
514+
/// [`MaybeUninit::assume_init`]: mem::MaybeUninit::assume_init
515515
///
516516
/// # Examples
517517
///
@@ -550,7 +550,7 @@ impl<T> Rc<[mem::MaybeUninit<T>]> {
550550
/// Calling this when the content is not yet fully initialized
551551
/// causes immediate undefined behavior.
552552
///
553-
/// [`MaybeUninit::assume_init`]: ../../std/mem/union.MaybeUninit.html#method.assume_init
553+
/// [`MaybeUninit::assume_init`]: mem::MaybeUninit::assume_init
554554
///
555555
/// # Examples
556556
///

‎library/alloc/src/sync.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ macro_rules! acquire {
152152
/// [upgrade]: Weak::upgrade
153153
/// [`RefCell<T>`]: core::cell::RefCell
154154
/// [`std::sync`]: ../../std/sync/index.html
155-
/// [`Arc::clone(&from)`]: #method.clone
155+
/// [`Arc::clone(&from)`]: Arc::clone
156156
///
157157
/// # Examples
158158
///
@@ -201,7 +201,7 @@ macro_rules! acquire {
201201
/// See the [`rc` documentation][rc_examples] for more examples of reference
202202
/// counting in general.
203203
///
204-
/// [rc_examples]: ../../std/rc/index.html#examples
204+
/// [rc_examples]: crate::rc#examples
205205
#[cfg_attr(not(test), rustc_diagnostic_item = "Arc")]
206206
#[stable(feature = "rust1", since = "1.0.0")]
207207
pub struct Arc<T: ?Sized> {

‎library/core/src/pin.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ impl<'a, T: ?Sized> Pin<&'a T> {
661661
/// because it is one of the fields of that value), and also that you do
662662
/// not move out of the argument you receive to the interior function.
663663
///
664-
/// [`pin` module]: ../../std/pin/index.html#projections-and-structural-pinning
664+
/// [`pin` module]: self#projections-and-structural-pinning
665665
#[stable(feature = "pin", since = "1.33.0")]
666666
pub unsafe fn map_unchecked<U, F>(self, func: F) -> Pin<&'a U>
667667
where
@@ -692,7 +692,7 @@ impl<'a, T: ?Sized> Pin<&'a T> {
692692
/// the `Pin` itself. This method allows turning the `Pin` into a reference
693693
/// with the same lifetime as the original `Pin`.
694694
///
695-
/// ["pinning projections"]: ../../std/pin/index.html#projections-and-structural-pinning
695+
/// ["pinning projections"]: self#projections-and-structural-pinning
696696
#[stable(feature = "pin", since = "1.33.0")]
697697
#[inline(always)]
698698
pub fn get_ref(self) -> &'a T {
@@ -756,7 +756,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
756756
/// because it is one of the fields of that value), and also that you do
757757
/// not move out of the argument you receive to the interior function.
758758
///
759-
/// [`pin` module]: ../../std/pin/index.html#projections-and-structural-pinning
759+
/// [`pin` module]: self#projections-and-structural-pinning
760760
#[stable(feature = "pin", since = "1.33.0")]
761761
pub unsafe fn map_unchecked_mut<U, F>(self, func: F) -> Pin<&'a mut U>
762762
where

‎library/std/src/ascii.rs

-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ pub trait AsciiExt {
7070
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
7171
///
7272
/// [`make_ascii_uppercase`]: AsciiExt::make_ascii_uppercase
73-
/// [`str::to_uppercase`]: ../primitive.str.html#method.to_uppercase
7473
#[stable(feature = "rust1", since = "1.0.0")]
7574
#[allow(deprecated)]
7675
fn to_ascii_uppercase(&self) -> Self::Owned;
@@ -91,7 +90,6 @@ pub trait AsciiExt {
9190
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
9291
///
9392
/// [`make_ascii_lowercase`]: AsciiExt::make_ascii_lowercase
94-
/// [`str::to_lowercase`]: ../primitive.str.html#method.to_lowercase
9593
#[stable(feature = "rust1", since = "1.0.0")]
9694
#[allow(deprecated)]
9795
fn to_ascii_lowercase(&self) -> Self::Owned;

‎library/std/src/fs.rs

+15-15
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ impl File {
553553
/// the `SetFileInformationByHandle` function on Windows. Note that, this
554554
/// [may change in the future][changes].
555555
///
556-
/// [changes]: ../io/index.html#platform-specific-behavior
556+
/// [changes]: io#platform-specific-behavior
557557
///
558558
/// # Errors
559559
///
@@ -1503,7 +1503,7 @@ impl AsInner<fs_imp::DirEntry> for DirEntry {
15031503
/// and the `DeleteFile` function on Windows.
15041504
/// Note that, this [may change in the future][changes].
15051505
///
1506-
/// [changes]: ../io/index.html#platform-specific-behavior
1506+
/// [changes]: io#platform-specific-behavior
15071507
///
15081508
/// # Errors
15091509
///
@@ -1541,7 +1541,7 @@ pub fn remove_file<P: AsRef<Path>>(path: P) -> io::Result<()> {
15411541
/// and the `GetFileAttributesEx` function on Windows.
15421542
/// Note that, this [may change in the future][changes].
15431543
///
1544-
/// [changes]: ../io/index.html#platform-specific-behavior
1544+
/// [changes]: io#platform-specific-behavior
15451545
///
15461546
/// # Errors
15471547
///
@@ -1575,7 +1575,7 @@ pub fn metadata<P: AsRef<Path>>(path: P) -> io::Result<Metadata> {
15751575
/// and the `GetFileAttributesEx` function on Windows.
15761576
/// Note that, this [may change in the future][changes].
15771577
///
1578-
/// [changes]: ../io/index.html#platform-specific-behavior
1578+
/// [changes]: io#platform-specific-behavior
15791579
///
15801580
/// # Errors
15811581
///
@@ -1618,7 +1618,7 @@ pub fn symlink_metadata<P: AsRef<Path>>(path: P) -> io::Result<Metadata> {
16181618
///
16191619
/// Note that, this [may change in the future][changes].
16201620
///
1621-
/// [changes]: ../io/index.html#platform-specific-behavior
1621+
/// [changes]: io#platform-specific-behavior
16221622
///
16231623
/// # Errors
16241624
///
@@ -1669,7 +1669,7 @@ pub fn rename<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<()>
16691669
/// `fcopyfile`.
16701670
/// Note that, this [may change in the future][changes].
16711671
///
1672-
/// [changes]: ../io/index.html#platform-specific-behavior
1672+
/// [changes]: io#platform-specific-behavior
16731673
///
16741674
/// # Errors
16751675
///
@@ -1707,7 +1707,7 @@ pub fn copy<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<u64> {
17071707
/// and the `CreateHardLink` function on Windows.
17081708
/// Note that, this [may change in the future][changes].
17091709
///
1710-
/// [changes]: ../io/index.html#platform-specific-behavior
1710+
/// [changes]: io#platform-specific-behavior
17111711
///
17121712
/// # Errors
17131713
///
@@ -1772,7 +1772,7 @@ pub fn soft_link<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> io::Result<(
17721772
/// `FILE_FLAG_BACKUP_SEMANTICS` flags on Windows.
17731773
/// Note that, this [may change in the future][changes].
17741774
///
1775-
/// [changes]: ../io/index.html#platform-specific-behavior
1775+
/// [changes]: io#platform-specific-behavior
17761776
///
17771777
/// # Errors
17781778
///
@@ -1812,7 +1812,7 @@ pub fn read_link<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
18121812
/// with other applications (if passed to the application on the command-line,
18131813
/// or written to a file another application may read).
18141814
///
1815-
/// [changes]: ../io/index.html#platform-specific-behavior
1815+
/// [changes]: io#platform-specific-behavior
18161816
/// [path]: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
18171817
///
18181818
/// # Errors
@@ -1846,7 +1846,7 @@ pub fn canonicalize<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
18461846
/// and the `CreateDirectory` function on Windows.
18471847
/// Note that, this [may change in the future][changes].
18481848
///
1849-
/// [changes]: ../io/index.html#platform-specific-behavior
1849+
/// [changes]: io#platform-specific-behavior
18501850
///
18511851
/// **NOTE**: If a parent of the given path doesn't exist, this function will
18521852
/// 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<()> {
18871887
/// and the `CreateDirectory` function on Windows.
18881888
/// Note that, this [may change in the future][changes].
18891889
///
1890-
/// [changes]: ../io/index.html#platform-specific-behavior
1890+
/// [changes]: io#platform-specific-behavior
18911891
///
18921892
/// # Errors
18931893
///
@@ -1930,7 +1930,7 @@ pub fn create_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {
19301930
/// and the `RemoveDirectory` function on Windows.
19311931
/// Note that, this [may change in the future][changes].
19321932
///
1933-
/// [changes]: ../io/index.html#platform-specific-behavior
1933+
/// [changes]: io#platform-specific-behavior
19341934
///
19351935
/// # Errors
19361936
///
@@ -1970,7 +1970,7 @@ pub fn remove_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
19701970
/// on Windows.
19711971
/// Note that, this [may change in the future][changes].
19721972
///
1973-
/// [changes]: ../io/index.html#platform-specific-behavior
1973+
/// [changes]: io#platform-specific-behavior
19741974
///
19751975
/// # Errors
19761976
///
@@ -2006,7 +2006,7 @@ pub fn remove_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {
20062006
/// currently corresponds to `readdir` on Unix and `FindNextFile` on Windows.
20072007
/// Note that, this [may change in the future][changes].
20082008
///
2009-
/// [changes]: ../io/index.html#platform-specific-behavior
2009+
/// [changes]: io#platform-specific-behavior
20102010
///
20112011
/// The order in which this iterator returns entries is platform and filesystem
20122012
/// dependent.
@@ -2075,7 +2075,7 @@ pub fn read_dir<P: AsRef<Path>>(path: P) -> io::Result<ReadDir> {
20752075
/// and the `SetFileAttributes` function on Windows.
20762076
/// Note that, this [may change in the future][changes].
20772077
///
2078-
/// [changes]: ../io/index.html#platform-specific-behavior
2078+
/// [changes]: io#platform-specific-behavior
20792079
///
20802080
/// # Errors
20812081
///

‎library/std/src/net/addr.rs

-4
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,6 @@ impl SocketAddr {
213213
///
214214
/// [IP address]: IpAddr
215215
/// [`IPv4` address]: IpAddr::V4
216-
/// [`false`]: ../../std/primitive.bool.html
217-
/// [`true`]: ../../std/primitive.bool.html
218216
///
219217
/// # Examples
220218
///
@@ -235,8 +233,6 @@ impl SocketAddr {
235233
///
236234
/// [IP address]: IpAddr
237235
/// [`IPv6` address]: IpAddr::V6
238-
/// [`false`]: ../../std/primitive.bool.html
239-
/// [`true`]: ../../std/primitive.bool.html
240236
///
241237
/// # Examples
242238
///

‎library/std/src/net/ip.rs

-42
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,6 @@ impl IpAddr {
140140
/// See the documentation for [`Ipv4Addr::is_unspecified()`] and
141141
/// [`Ipv6Addr::is_unspecified()`] for more details.
142142
///
143-
/// [`true`]: ../../std/primitive.bool.html
144-
///
145143
/// # Examples
146144
///
147145
/// ```
@@ -163,8 +161,6 @@ impl IpAddr {
163161
/// See the documentation for [`Ipv4Addr::is_loopback()`] and
164162
/// [`Ipv6Addr::is_loopback()`] for more details.
165163
///
166-
/// [`true`]: ../../std/primitive.bool.html
167-
///
168164
/// # Examples
169165
///
170166
/// ```
@@ -186,8 +182,6 @@ impl IpAddr {
186182
/// See the documentation for [`Ipv4Addr::is_global()`] and
187183
/// [`Ipv6Addr::is_global()`] for more details.
188184
///
189-
/// [`true`]: ../../std/primitive.bool.html
190-
///
191185
/// # Examples
192186
///
193187
/// ```
@@ -210,8 +204,6 @@ impl IpAddr {
210204
/// See the documentation for [`Ipv4Addr::is_multicast()`] and
211205
/// [`Ipv6Addr::is_multicast()`] for more details.
212206
///
213-
/// [`true`]: ../../std/primitive.bool.html
214-
///
215207
/// # Examples
216208
///
217209
/// ```
@@ -233,8 +225,6 @@ impl IpAddr {
233225
/// See the documentation for [`Ipv4Addr::is_documentation()`] and
234226
/// [`Ipv6Addr::is_documentation()`] for more details.
235227
///
236-
/// [`true`]: ../../std/primitive.bool.html
237-
///
238228
/// # Examples
239229
///
240230
/// ```
@@ -258,8 +248,6 @@ impl IpAddr {
258248
/// Returns [`true`] if this address is an [`IPv4` address], and [`false`]
259249
/// otherwise.
260250
///
261-
/// [`true`]: ../../std/primitive.bool.html
262-
/// [`false`]: ../../std/primitive.bool.html
263251
/// [`IPv4` address]: IpAddr::V4
264252
///
265253
/// # Examples
@@ -278,8 +266,6 @@ impl IpAddr {
278266
/// Returns [`true`] if this address is an [`IPv6` address], and [`false`]
279267
/// otherwise.
280268
///
281-
/// [`true`]: ../../std/primitive.bool.html
282-
/// [`false`]: ../../std/primitive.bool.html
283269
/// [`IPv6` address]: IpAddr::V6
284270
///
285271
/// # Examples
@@ -377,7 +363,6 @@ impl Ipv4Addr {
377363
/// This property is defined in _UNIX Network Programming, Second Edition_,
378364
/// W. Richard Stevens, p. 891; see also [ip7].
379365
///
380-
/// [`true`]: ../../std/primitive.bool.html
381366
/// [ip7]: http://man7.org/linux/man-pages/man7/ip.7.html
382367
///
383368
/// # Examples
@@ -398,7 +383,6 @@ impl Ipv4Addr {
398383
///
399384
/// This property is defined by [IETF RFC 1122].
400385
///
401-
/// [`true`]: ../../std/primitive.bool.html
402386
/// [IETF RFC 1122]: https://tools.ietf.org/html/rfc1122
403387
///
404388
/// # Examples
@@ -423,7 +407,6 @@ impl Ipv4Addr {
423407
/// - 172.16.0.0/12
424408
/// - 192.168.0.0/16
425409
///
426-
/// [`true`]: ../../std/primitive.bool.html
427410
/// [IETF RFC 1918]: https://tools.ietf.org/html/rfc1918
428411
///
429412
/// # Examples
@@ -454,7 +437,6 @@ impl Ipv4Addr {
454437
///
455438
/// This property is defined by [IETF RFC 3927].
456439
///
457-
/// [`true`]: ../../std/primitive.bool.html
458440
/// [IETF RFC 3927]: https://tools.ietf.org/html/rfc3927
459441
///
460442
/// # Examples
@@ -494,8 +476,6 @@ impl Ipv4Addr {
494476
/// - addresses reserved for networking devices benchmarking (see
495477
/// [`Ipv4Addr::is_benchmarking()`])
496478
///
497-
/// [`true`]: ../../std/primitive.bool.html
498-
/// [`false`]: ../../std/primitive.bool.html
499479
/// [ipv4-sr]: https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml
500480
///
501481
/// # Examples
@@ -571,7 +551,6 @@ impl Ipv4Addr {
571551
/// Returns [`true`] if this address is part of the Shared Address Space defined in
572552
/// [IETF RFC 6598] (`100.64.0.0/10`).
573553
///
574-
/// [`true`]: ../../std/primitive.bool.html
575554
/// [IETF RFC 6598]: https://tools.ietf.org/html/rfc6598
576555
///
577556
/// # Examples
@@ -598,7 +577,6 @@ impl Ipv4Addr {
598577
/// - `192.0.0.9/32` is the "Port Control Protocol Anycast" (see [IETF RFC 7723])
599578
/// - `192.0.0.10/32` is used for NAT traversal (see [IETF RFC 8155])
600579
///
601-
/// [`true`]: ../../std/primitive.bool.html
602580
/// [IETF RFC 6890]: https://tools.ietf.org/html/rfc6890
603581
/// [IETF RFC 7600]: https://tools.ietf.org/html/rfc7600
604582
/// [IETF RFC 7723]: https://tools.ietf.org/html/rfc7723
@@ -626,7 +604,6 @@ impl Ipv4Addr {
626604
/// network devices benchmarking. This range is defined in [IETF RFC 2544] as `192.18.0.0`
627605
/// through `198.19.255.255` but [errata 423] corrects it to `198.18.0.0/15`.
628606
///
629-
/// [`true`]: ../../std/primitive.bool.html
630607
/// [IETF RFC 2544]: https://tools.ietf.org/html/rfc2544
631608
/// [errata 423]: https://www.rfc-editor.org/errata/eid423
632609
///
@@ -651,7 +628,6 @@ impl Ipv4Addr {
651628
/// broadcast address `255.255.255.255`, but this implementation explicitly excludes it, since
652629
/// it is obviously not reserved for future use.
653630
///
654-
/// [`true`]: ../../std/primitive.bool.html
655631
/// [IETF RFC 1112]: https://tools.ietf.org/html/rfc1112
656632
///
657633
/// # Warning
@@ -684,7 +660,6 @@ impl Ipv4Addr {
684660
/// Multicast addresses have a most significant octet between 224 and 239,
685661
/// and is defined by [IETF RFC 5771].
686662
///
687-
/// [`true`]: ../../std/primitive.bool.html
688663
/// [IETF RFC 5771]: https://tools.ietf.org/html/rfc5771
689664
///
690665
/// # Examples
@@ -706,7 +681,6 @@ impl Ipv4Addr {
706681
///
707682
/// A broadcast address has all octets set to 255 as defined in [IETF RFC 919].
708683
///
709-
/// [`true`]: ../../std/primitive.bool.html
710684
/// [IETF RFC 919]: https://tools.ietf.org/html/rfc919
711685
///
712686
/// # Examples
@@ -731,7 +705,6 @@ impl Ipv4Addr {
731705
/// - 198.51.100.0/24 (TEST-NET-2)
732706
/// - 203.0.113.0/24 (TEST-NET-3)
733707
///
734-
/// [`true`]: ../../std/primitive.bool.html
735708
/// [IETF RFC 5737]: https://tools.ietf.org/html/rfc5737
736709
///
737710
/// # Examples
@@ -1148,7 +1121,6 @@ impl Ipv6Addr {
11481121
///
11491122
/// This property is defined in [IETF RFC 4291].
11501123
///
1151-
/// [`true`]: ../../std/primitive.bool.html
11521124
/// [IETF RFC 4291]: https://tools.ietf.org/html/rfc4291
11531125
///
11541126
/// # Examples
@@ -1169,7 +1141,6 @@ impl Ipv6Addr {
11691141
///
11701142
/// This property is defined in [IETF RFC 4291].
11711143
///
1172-
/// [`true`]: ../../std/primitive.bool.html
11731144
/// [IETF RFC 4291]: https://tools.ietf.org/html/rfc4291
11741145
///
11751146
/// # Examples
@@ -1194,9 +1165,6 @@ impl Ipv6Addr {
11941165
/// - link-local and unique local unicast addresses
11951166
/// - interface-, link-, realm-, admin- and site-local multicast addresses
11961167
///
1197-
/// [`true`]: ../../std/primitive.bool.html
1198-
/// [`false`]: ../../std/primitive.bool.html
1199-
///
12001168
/// # Examples
12011169
///
12021170
/// ```
@@ -1223,8 +1191,6 @@ impl Ipv6Addr {
12231191
///
12241192
/// [IETF RFC 4193]: https://tools.ietf.org/html/rfc4193
12251193
///
1226-
/// [`true`]: ../../std/primitive.bool.html
1227-
///
12281194
/// # Examples
12291195
///
12301196
/// ```
@@ -1257,8 +1223,6 @@ impl Ipv6Addr {
12571223
/// addresses such as `fe80:0:0:1::` or `fe81::` as unicast link-local addresses for example.
12581224
/// If you need a less strict validation use [`Ipv6Addr::is_unicast_link_local()`] instead.
12591225
///
1260-
/// [`true`]: ../../std/primitive.bool.html
1261-
///
12621226
/// # Examples
12631227
///
12641228
/// ```
@@ -1317,8 +1281,6 @@ impl Ipv6Addr {
13171281
/// If you need a strict validation fully compliant with the RFC, use
13181282
/// [`Ipv6Addr::is_unicast_link_local_strict()`] instead.
13191283
///
1320-
/// [`true`]: ../../std/primitive.bool.html
1321-
///
13221284
/// # Examples
13231285
///
13241286
/// ```
@@ -1365,7 +1327,6 @@ impl Ipv6Addr {
13651327
/// +----------+-------------------------+----------------------------+
13661328
/// ```
13671329
///
1368-
/// [`true`]: ../../std/primitive.bool.html
13691330
/// [RFC 4291 section 2.5.7]: https://tools.ietf.org/html/rfc4291#section-2.5.7
13701331
///
13711332
/// # Examples
@@ -1399,7 +1360,6 @@ impl Ipv6Addr {
13991360
///
14001361
/// This property is defined in [IETF RFC 3849].
14011362
///
1402-
/// [`true`]: ../../std/primitive.bool.html
14031363
/// [IETF RFC 3849]: https://tools.ietf.org/html/rfc3849
14041364
///
14051365
/// # Examples
@@ -1435,7 +1395,6 @@ impl Ipv6Addr {
14351395
/// Global Unicast).
14361396
/// ```
14371397
///
1438-
/// [`true`]: ../../std/primitive.bool.html
14391398
/// [RFC 4291 section 2.5.7]: https://tools.ietf.org/html/rfc4291#section-2.5.7
14401399
///
14411400
/// # Examples
@@ -1495,7 +1454,6 @@ impl Ipv6Addr {
14951454
///
14961455
/// This property is defined by [IETF RFC 4291].
14971456
///
1498-
/// [`true`]: ../../std/primitive.bool.html
14991457
/// [IETF RFC 4291]: https://tools.ietf.org/html/rfc4291
15001458
///
15011459
/// # Examples

‎library/std/src/prelude/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
//! [`std::result`]: crate::result
7676
//! [`std::slice`]: crate::slice
7777
//! [`std::string`]: crate::string
78-
//! [`std::vec`]: ../vec/index.html
78+
//! [`std::vec`]: mod@crate::vec
7979
//! [`to_owned`]: crate::borrow::ToOwned::to_owned
8080
//! [book-closures]: ../../book/ch13-01-closures.html
8181
//! [book-dtor]: ../../book/ch15-03-drop.html

‎library/std/src/sys/unix/ext/fs.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ use crate::path::Path;
88
use crate::sys;
99
use crate::sys::platform::fs::MetadataExt as UnixMetadataExt;
1010
use crate::sys_common::{AsInner, AsInnerMut, FromInner};
11+
// Used for `File::read` on intra-doc links
12+
#[allow(unused_imports)]
13+
use io::{Read, Write};
1114

1215
/// Unix-specific extensions to [`fs::File`].
1316
#[stable(feature = "file_offset", since = "1.15.0")]
@@ -24,7 +27,7 @@ pub trait FileExt {
2427
/// Note that similar to [`File::read`], it is not an error to return with a
2528
/// short read.
2629
///
27-
/// [`File::read`]: ../../../../std/fs/struct.File.html#method.read
30+
/// [`File::read`]: fs::File::read
2831
///
2932
/// # Examples
3033
///
@@ -127,7 +130,7 @@ pub trait FileExt {
127130
/// Note that similar to [`File::write`], it is not an error to return a
128131
/// short write.
129132
///
130-
/// [`File::write`]: ../../../../std/fs/struct.File.html#method.write
133+
/// [`File::write`]: fs::File::write
131134
///
132135
/// # Examples
133136
///

0 commit comments

Comments
 (0)
Please sign in to comment.