Skip to content

Commit 6c317a3

Browse files
committed
update docs references, fix linkchecker and tests
added some code in linkchecker to check the generic::String docs when trying to resolve links to alloc::string::String type alias. There's some lazy-loading that the browser does, but linkchecker doesn't, so maybe some general-purpose solution would be better, but this seemed better than a big list of exceptions.
1 parent 840054d commit 6c317a3

File tree

31 files changed

+91
-72
lines changed

31 files changed

+91
-72
lines changed

RELEASES.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ Stabilized APIs
9898
- [`impl PartialEq<String> for PathBuf`](https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#impl-PartialEq%3CString%3E-for-PathBuf)
9999
- [`impl PartialEq<str> for Path`](https://doc.rust-lang.org/stable/std/path/struct.Path.html#impl-PartialEq%3Cstr%3E-for-Path)
100100
- [`impl PartialEq<String> for Path`](https://doc.rust-lang.org/stable/std/path/struct.Path.html#impl-PartialEq%3CString%3E-for-Path)
101-
- [`impl PartialEq<PathBuf> for String`](https://doc.rust-lang.org/stable/std/string/struct.String.html#impl-PartialEq%3CPathBuf%3E-for-String)
102-
- [`impl PartialEq<Path> for String`](https://doc.rust-lang.org/stable/std/string/struct.String.html#impl-PartialEq%3CPath%3E-for-String)
101+
- [`impl PartialEq<PathBuf> for String`](https://doc.rust-lang.org/stable/std/string/type.String.html#impl-PartialEq%3CPathBuf%3E-for-String)
102+
- [`impl PartialEq<Path> for String`](https://doc.rust-lang.org/stable/std/string/type.String.html#impl-PartialEq%3CPath%3E-for-String)
103103
- [`impl PartialEq<PathBuf> for str`](https://doc.rust-lang.org/stable/std/primitive.str.html#impl-PartialEq%3CPathBuf%3E-for-str)
104104
- [`impl PartialEq<Path> for str`](https://doc.rust-lang.org/stable/std/primitive.str.html#impl-PartialEq%3CPath%3E-for-str)
105105
- [`Ipv4Addr::from_octets`](https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.from_octets)
@@ -649,7 +649,7 @@ Stabilized APIs
649649
- [`<[T]>::split_off_first_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off_first_mut)
650650
- [`<[T]>::split_off_last`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off_last)
651651
- [`<[T]>::split_off_last_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off_last_mut)
652-
- [`String::extend_from_within`](https://doc.rust-lang.org/stable/alloc/string/struct.String.html#method.extend_from_within)
652+
- [`String::extend_from_within`](https://doc.rust-lang.org/stable/alloc/string/type.String.html#method.extend_from_within)
653653
- [`os_str::Display`](https://doc.rust-lang.org/stable/std/ffi/os_str/struct.Display.html)
654654
- [`OsString::display`](https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.display)
655655
- [`OsStr::display`](https://doc.rust-lang.org/stable/std/ffi/struct.OsStr.html#method.display)
@@ -663,7 +663,7 @@ Stabilized APIs
663663
- [`impl From<PipeReader> for OwnedFd`](https://doc.rust-lang.org/stable/std/os/fd/struct.OwnedFd.html#impl-From%3CPipeReader%3E-for-OwnedFd)
664664
- [`impl From<PipeWriter> for OwnedFd`](https://doc.rust-lang.org/stable/std/os/fd/struct.OwnedFd.html#impl-From%3CPipeWriter%3E-for-OwnedFd)
665665
- [`Box<MaybeUninit<T>>::write`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.write)
666-
- [`impl TryFrom<Vec<u8>> for String`](https://doc.rust-lang.org/stable/std/string/struct.String.html#impl-TryFrom%3CVec%3Cu8%3E%3E-for-String)
666+
- [`impl TryFrom<Vec<u8>> for String`](https://doc.rust-lang.org/stable/std/string/type.String.html#impl-TryFrom%3CVec%3Cu8%3E%3E-for-String)
667667
- [`<*const T>::offset_from_unsigned`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset_from_unsigned)
668668
- [`<*const T>::byte_offset_from_unsigned`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.byte_offset_from_unsigned)
669669
- [`<*mut T>::offset_from_unsigned`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset_from_unsigned-1)
@@ -701,14 +701,14 @@ These previously stable APIs are now stable in const contexts:
701701
- [`char::is_whitespace`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.is_whitespace)
702702
- [`<[[T; N]]>::as_flattened`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_flattened)
703703
- [`<[[T; N]]>::as_flattened_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_flattened_mut)
704-
- [`String::into_bytes`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.into_bytes)
705-
- [`String::as_str`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.as_str)
706-
- [`String::capacity`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.capacity)
707-
- [`String::as_bytes`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.as_bytes)
708-
- [`String::len`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.len)
709-
- [`String::is_empty`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.is_empty)
710-
- [`String::as_mut_str`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.as_mut_str)
711-
- [`String::as_mut_vec`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.as_mut_vec)
704+
- [`String::into_bytes`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.into_bytes)
705+
- [`String::as_str`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.as_str)
706+
- [`String::capacity`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.capacity)
707+
- [`String::as_bytes`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.as_bytes)
708+
- [`String::len`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.len)
709+
- [`String::is_empty`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.is_empty)
710+
- [`String::as_mut_str`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.as_mut_str)
711+
- [`String::as_mut_vec`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.as_mut_vec)
712712
- [`Vec::as_ptr`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.as_ptr)
713713
- [`Vec::as_slice`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.as_slice)
714714
- [`Vec::capacity`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.capacity)
@@ -2760,7 +2760,7 @@ Stabilized APIs
27602760

27612761
- [`impl<T: Send> Sync for mpsc::Sender<T>`](https://doc.rust-lang.org/stable/std/sync/mpsc/struct.Sender.html#impl-Sync-for-Sender%3CT%3E)
27622762
- [`impl TryFrom<&OsStr> for &str`](https://doc.rust-lang.org/stable/std/primitive.str.html#impl-TryFrom%3C%26'a+OsStr%3E-for-%26'a+str)
2763-
- [`String::leak`](https://doc.rust-lang.org/stable/alloc/string/struct.String.html#method.leak)
2763+
- [`String::leak`](https://doc.rust-lang.org/stable/alloc/string/type.String.html#method.leak)
27642764

27652765
These APIs are now stable in const contexts:
27662766

@@ -4819,8 +4819,8 @@ and related tools.
48194819
[`collections::TryReserveError`]: https://doc.rust-lang.org/std/collections/struct.TryReserveError.html
48204820
[`HashMap::try_reserve`]: https://doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#method.try_reserve
48214821
[`HashSet::try_reserve`]: https://doc.rust-lang.org/std/collections/hash_set/struct.HashSet.html#method.try_reserve
4822-
[`String::try_reserve`]: https://doc.rust-lang.org/alloc/string/struct.String.html#method.try_reserve
4823-
[`String::try_reserve_exact`]: https://doc.rust-lang.org/alloc/string/struct.String.html#method.try_reserve_exact
4822+
[`String::try_reserve`]: https://doc.rust-lang.org/alloc/string/type.String.html#method.try_reserve
4823+
[`String::try_reserve_exact`]: https://doc.rust-lang.org/alloc/string/type.String.html#method.try_reserve_exact
48244824
[`Vec::try_reserve`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.try_reserve
48254825
[`Vec::try_reserve_exact`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.try_reserve_exact
48264826
[`VecDeque::try_reserve`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.try_reserve
@@ -4961,7 +4961,7 @@ and related tools.
49614961
[`BufWriter::into_parts`]: https://doc.rust-lang.org/stable/std/io/struct.BufWriter.html#method.into_parts
49624962
[`core::panic::{UnwindSafe, RefUnwindSafe, AssertUnwindSafe}`]: https://github.com/rust-lang/rust/pull/84662
49634963
[`Vec::shrink_to`]: https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.shrink_to
4964-
[`String::shrink_to`]: https://doc.rust-lang.org/stable/std/string/struct.String.html#method.shrink_to
4964+
[`String::shrink_to`]: https://doc.rust-lang.org/stable/std/string/type.String.html#method.shrink_to
49654965
[`OsString::shrink_to`]: https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.shrink_to
49664966
[`PathBuf::shrink_to`]: https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.shrink_to
49674967
[`BinaryHeap::shrink_to`]: https://doc.rust-lang.org/stable/std/collections/struct.BinaryHeap.html#method.shrink_to
@@ -9156,7 +9156,7 @@ Compatibility Notes
91569156
[`Iterator::try_for_each`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.try_for_each
91579157
[`NonNull::cast`]: https://doc.rust-lang.org/std/ptr/struct.NonNull.html#method.cast
91589158
[`Option::filter`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.filter
9159-
[`String::replace_range`]: https://doc.rust-lang.org/std/string/struct.String.html#method.replace_range
9159+
[`String::replace_range`]: https://doc.rust-lang.org/std/string/type.String.html#method.replace_range
91609160
[`Take::set_limit`]: https://doc.rust-lang.org/std/io/struct.Take.html#method.set_limit
91619161
[`hint::unreachable_unchecked`]: https://doc.rust-lang.org/std/hint/fn.unreachable_unchecked.html
91629162
[`os::unix::process::parent_id`]: https://doc.rust-lang.org/std/os/unix/process/fn.parent_id.html
@@ -9401,7 +9401,7 @@ Compatibility Notes
94019401
[`process::id`]: https://doc.rust-lang.org/std/process/fn.id.html
94029402
[`slice::rotate_left`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rotate_left
94039403
[`slice::rotate_right`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rotate_right
9404-
[`String::retain`]: https://doc.rust-lang.org/std/string/struct.String.html#method.retain
9404+
[`String::retain`]: https://doc.rust-lang.org/std/string/type.String.html#method.retain
94059405
[cargo/5041]: https://github.com/rust-lang/cargo/pull/5041
94069406
[cargo/5083]: https://github.com/rust-lang/cargo/pull/5083
94079407

@@ -10852,8 +10852,8 @@ Compatibility Notes
1085210852
[`Result::unwrap_or_default`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.unwrap_or_default
1085310853
[`SocketAddr::is_ipv4`]: https://doc.rust-lang.org/std/net/enum.SocketAddr.html#method.is_ipv4
1085410854
[`SocketAddr::is_ipv6`]: https://doc.rust-lang.org/std/net/enum.SocketAddr.html#method.is_ipv6
10855-
[`String::insert_str`]: https://doc.rust-lang.org/std/string/struct.String.html#method.insert_str
10856-
[`String::split_off`]: https://doc.rust-lang.org/std/string/struct.String.html#method.split_off
10855+
[`String::insert_str`]: https://doc.rust-lang.org/std/string/type.String.html#method.insert_str
10856+
[`String::split_off`]: https://doc.rust-lang.org/std/string/type.String.html#method.split_off
1085710857
[`Vec::dedup_by_key`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.dedup_by_key
1085810858
[`Vec::dedup_by`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.dedup_by
1085910859
[`VecDeque::resize`]: https://doc.rust-lang.org/std/collections/vec_deque/struct.VecDeque.html#method.resize
@@ -12767,8 +12767,8 @@ Compatibility Notes
1276712767
[`Ipv6Addr::is_unspecified`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#method.is_unspecified
1276812768
[`Path::strip_prefix`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.strip_prefix
1276912769
[`RandomState::new`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.RandomState.html#method.new
12770-
[`String::as_mut_str`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.as_mut_str
12771-
[`String::as_str`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.as_str
12770+
[`String::as_mut_str`]: http://doc.rust-lang.org/nightly/std/string/type.String.html#method.as_mut_str
12771+
[`String::as_str`]: http://doc.rust-lang.org/nightly/std/string/type.String.html#method.as_str
1277212772
[`Vec::as_mut_slice`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.as_mut_slice
1277312773
[`Vec::as_slice`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.as_slice
1277412774
[`clone_from_slice`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.clone_from_slice
@@ -12954,7 +12954,7 @@ Compatibility Notes
1295412954
[`os::unix::fs::DirBuilderExt::mode`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.DirBuilderExt.html#tymethod.mode
1295512955
[`os::unix::fs::DirBuilderExt`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.DirBuilderExt.html
1295612956
[`string::Drain`]: http://doc.rust-lang.org/nightly/std/string/struct.Drain.html
12957-
[`string::String::drain`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.drain
12957+
[`string::String::drain`]: http://doc.rust-lang.org/nightly/std/string/type.String.html#method.drain
1295812958
[`vec::Drain`]: http://doc.rust-lang.org/nightly/std/vec/struct.Drain.html
1295912959
[`vec::Vec::drain`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.drain
1296012960
[`vec_deque::Drain`]: http://doc.rust-lang.org/nightly/std/collections/vec_deque/struct.Drain.html
@@ -13303,7 +13303,7 @@ Miscellaneous
1330313303
[`Rc::make_mut`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.make_mut
1330413304
[`Rc::try_unwrap`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.try_unwrap
1330513305
[`Result::expect`]: http://doc.rust-lang.org/nightly/core/result/enum.Result.html#method.expect
13306-
[`String::into_boxed_str`]: http://doc.rust-lang.org/nightly/collections/string/struct.String.html#method.into_boxed_str
13306+
[`String::into_boxed_str`]: http://doc.rust-lang.org/nightly/collections/string/type.String.html#method.into_boxed_str
1330713307
[`TcpStream::read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.read_timeout
1330813308
[`TcpStream::set_read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_read_timeout
1330913309
[`TcpStream::write_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.write_timeout

library/alloc/src/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2120,7 +2120,7 @@ impl<A: Allocator> generic::String<A> {
21202120
/// assert_eq!(s, "Test Results: ✅❌❌");
21212121
/// ```
21222122
///
2123-
/// [replacen]: ../../std/primitive.str.html#method.replacen
2123+
/// [replacen]: ../../../std/primitive.str.html#method.replacen
21242124
#[cfg(not(no_global_oom_handling))]
21252125
#[unstable(feature = "string_replace_in_place", issue = "147949")]
21262126
pub fn replace_first<P: Pattern>(&mut self, from: P, to: &str) {

library/core/src/any.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ impl fmt::Debug for TypeId {
857857
/// ```rust
858858
/// assert_eq!(
859859
/// std::any::type_name::<Option<String>>(),
860-
/// "core::option::Option<alloc::string::String>",
860+
/// "core::option::Option<alloc::string::generic::String>",
861861
/// );
862862
/// ```
863863
#[must_use]

library/core/src/borrow.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
/// [`Box<T>`]: ../../std/boxed/struct.Box.html
4444
/// [`Mutex<T>`]: ../../std/sync/struct.Mutex.html
4545
/// [`Rc<T>`]: ../../std/rc/struct.Rc.html
46-
/// [`String`]: ../../std/string/struct.String.html
46+
/// [`String`]: ../../std/string/type.String.html
4747
/// [`borrow`]: Borrow::borrow
4848
///
4949
/// # Examples
@@ -151,7 +151,7 @@
151151
///
152152
/// [`Hash`]: crate::hash::Hash
153153
/// [`HashMap<K, V>`]: ../../std/collections/struct.HashMap.html
154-
/// [`String`]: ../../std/string/struct.String.html
154+
/// [`String`]: ../../std/string/type.String.html
155155
#[stable(feature = "rust1", since = "1.0.0")]
156156
#[rustc_diagnostic_item = "Borrow"]
157157
#[rustc_const_unstable(feature = "const_convert", issue = "143773")]

library/core/src/char/methods.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl char {
8686
/// decoding error.
8787
///
8888
/// It can occur, for example, when giving ill-formed UTF-8 bytes to
89-
/// [`String::from_utf8_lossy`](../std/string/struct.String.html#method.from_utf8_lossy).
89+
/// [`String::from_utf8_lossy`](../std/string/type.String.html#method.from_utf8_lossy).
9090
#[stable(feature = "assoc_char_consts", since = "1.52.0")]
9191
pub const REPLACEMENT_CHARACTER: char = '\u{FFFD}';
9292

library/core/src/convert/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ pub const fn identity<T>(x: T) -> T {
201201
/// [`Borrow`]: crate::borrow::Borrow
202202
/// [`Eq`]: crate::cmp::Eq
203203
/// [`Ord`]: crate::cmp::Ord
204-
/// [`String`]: ../../std/string/struct.String.html
204+
/// [`String`]: ../../std/string/type.String.html
205205
///
206206
/// ```
207207
/// fn is_hello<T: AsRef<str>>(s: T) {
@@ -442,7 +442,7 @@ pub const trait AsMut<T: PointeeSized>: PointeeSized {
442442
/// is_hello(s);
443443
/// ```
444444
///
445-
/// [`String`]: ../../std/string/struct.String.html
445+
/// [`String`]: ../../std/string/type.String.html
446446
/// [`Vec`]: ../../std/vec/struct.Vec.html
447447
#[rustc_diagnostic_item = "Into"]
448448
#[stable(feature = "rust1", since = "1.0.0")]
@@ -573,7 +573,7 @@ pub const trait Into<T>: Sized {
573573
/// }
574574
/// ```
575575
///
576-
/// [`String`]: ../../std/string/struct.String.html
576+
/// [`String`]: ../../std/string/type.String.html
577577
/// [`from`]: From::from
578578
/// [book]: ../../book/ch09-00-error-handling.html
579579
#[rustc_diagnostic_item = "From"]

library/core/src/iter/traits/iterator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2006,7 +2006,7 @@ pub trait Iterator {
20062006
/// ```
20072007
///
20082008
/// [`iter`]: Iterator::next
2009-
/// [`String`]: ../../std/string/struct.String.html
2009+
/// [`String`]: ../../std/string/type.String.html
20102010
/// [`char`]: type@char
20112011
#[inline]
20122012
#[stable(feature = "rust1", since = "1.0.0")]

library/core/src/marker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ marker_impls! {
450450
/// while variables captured by mutable reference never implement `Copy`.
451451
///
452452
/// [`Vec<T>`]: ../../std/vec/struct.Vec.html
453-
/// [`String`]: ../../std/string/struct.String.html
453+
/// [`String`]: ../../std/string/type.String.html
454454
/// [`size_of::<T>`]: size_of
455455
/// [impls]: #implementors
456456
#[stable(feature = "rust1", since = "1.0.0")]

library/core/src/ops/deref.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ use crate::marker::PointeeSized;
102102
/// [method resolution]: ../../reference/expressions/method-call-expr.html
103103
/// [type coercions]: ../../reference/type-coercions.html
104104
/// [box]: ../../alloc/boxed/struct.Box.html
105-
/// [string]: ../../alloc/string/struct.String.html
105+
/// [string]: ../../alloc/string/type.String.html
106106
/// [vec]: ../../alloc/vec/struct.Vec.html
107107
/// [rc]: ../../alloc/rc/struct.Rc.html
108108
/// [cow]: ../../alloc/borrow/enum.Cow.html
@@ -229,7 +229,7 @@ impl<T: ?Sized> const Deref for &mut T {
229229
/// [method resolution]: ../../reference/expressions/method-call-expr.html
230230
/// [type coercions]: ../../reference/type-coercions.html
231231
/// [box]: ../../alloc/boxed/struct.Box.html
232-
/// [string]: ../../alloc/string/struct.String.html
232+
/// [string]: ../../alloc/string/type.String.html
233233
/// [rc]: ../../alloc/rc/struct.Rc.html
234234
/// [cow]: ../../alloc/borrow/enum.Cow.html
235235
///

library/core/src/option.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -728,8 +728,8 @@ impl<T> Option<T> {
728728
/// reference to the value inside the original.
729729
///
730730
/// [`map`]: Option::map
731-
/// [String]: ../../std/string/struct.String.html "String"
732-
/// [`String`]: ../../std/string/struct.String.html "String"
731+
/// [String]: ../../std/string/type.String.html "String"
732+
/// [`String`]: ../../std/string/type.String.html "String"
733733
///
734734
/// ```
735735
/// let text: Option<String> = Some("Hello, world!".to_string());
@@ -1144,7 +1144,7 @@ impl<T> Option<T> {
11441144
/// Calculates the length of an <code>Option<[String]></code> as an
11451145
/// <code>Option<[usize]></code>, consuming the original:
11461146
///
1147-
/// [String]: ../../std/string/struct.String.html "String"
1147+
/// [String]: ../../std/string/type.String.html "String"
11481148
/// ```
11491149
/// let maybe_some_string = Some(String::from("Hello, World!"));
11501150
/// // `Option::map` takes self *by value*, consuming `maybe_some_string`
@@ -2312,7 +2312,7 @@ impl<'a, T> const From<&'a Option<T>> for Option<&'a T> {
23122312
/// to the value inside the original.
23132313
///
23142314
/// [`map`]: Option::map
2315-
/// [String]: ../../std/string/struct.String.html "String"
2315+
/// [String]: ../../std/string/type.String.html "String"
23162316
///
23172317
/// ```
23182318
/// let s: Option<String> = Some(String::from("Hello, Rustaceans!"));

0 commit comments

Comments
 (0)