Skip to content

Commit a70dcce

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 83177c3 commit a70dcce

30 files changed

Lines changed: 90 additions & 71 deletions

File tree

RELEASES.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,8 @@ Stabilized APIs
303303
- [`impl PartialEq<String> for PathBuf`](https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#impl-PartialEq%3CString%3E-for-PathBuf)
304304
- [`impl PartialEq<str> for Path`](https://doc.rust-lang.org/stable/std/path/struct.Path.html#impl-PartialEq%3Cstr%3E-for-Path)
305305
- [`impl PartialEq<String> for Path`](https://doc.rust-lang.org/stable/std/path/struct.Path.html#impl-PartialEq%3CString%3E-for-Path)
306-
- [`impl PartialEq<PathBuf> for String`](https://doc.rust-lang.org/stable/std/string/struct.String.html#impl-PartialEq%3CPathBuf%3E-for-String)
307-
- [`impl PartialEq<Path> for String`](https://doc.rust-lang.org/stable/std/string/struct.String.html#impl-PartialEq%3CPath%3E-for-String)
306+
- [`impl PartialEq<PathBuf> for String`](https://doc.rust-lang.org/stable/std/string/type.String.html#impl-PartialEq%3CPathBuf%3E-for-String)
307+
- [`impl PartialEq<Path> for String`](https://doc.rust-lang.org/stable/std/string/type.String.html#impl-PartialEq%3CPath%3E-for-String)
308308
- [`impl PartialEq<PathBuf> for str`](https://doc.rust-lang.org/stable/std/primitive.str.html#impl-PartialEq%3CPathBuf%3E-for-str)
309309
- [`impl PartialEq<Path> for str`](https://doc.rust-lang.org/stable/std/primitive.str.html#impl-PartialEq%3CPath%3E-for-str)
310310
- [`Ipv4Addr::from_octets`](https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.from_octets)
@@ -854,7 +854,7 @@ Stabilized APIs
854854
- [`<[T]>::split_off_first_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off_first_mut)
855855
- [`<[T]>::split_off_last`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off_last)
856856
- [`<[T]>::split_off_last_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off_last_mut)
857-
- [`String::extend_from_within`](https://doc.rust-lang.org/stable/alloc/string/struct.String.html#method.extend_from_within)
857+
- [`String::extend_from_within`](https://doc.rust-lang.org/stable/alloc/string/type.String.html#method.extend_from_within)
858858
- [`os_str::Display`](https://doc.rust-lang.org/stable/std/ffi/os_str/struct.Display.html)
859859
- [`OsString::display`](https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.display)
860860
- [`OsStr::display`](https://doc.rust-lang.org/stable/std/ffi/struct.OsStr.html#method.display)
@@ -868,7 +868,7 @@ Stabilized APIs
868868
- [`impl From<PipeReader> for OwnedFd`](https://doc.rust-lang.org/stable/std/os/fd/struct.OwnedFd.html#impl-From%3CPipeReader%3E-for-OwnedFd)
869869
- [`impl From<PipeWriter> for OwnedFd`](https://doc.rust-lang.org/stable/std/os/fd/struct.OwnedFd.html#impl-From%3CPipeWriter%3E-for-OwnedFd)
870870
- [`Box<MaybeUninit<T>>::write`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.write)
871-
- [`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)
871+
- [`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)
872872
- [`<*const T>::offset_from_unsigned`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset_from_unsigned)
873873
- [`<*const T>::byte_offset_from_unsigned`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.byte_offset_from_unsigned)
874874
- [`<*mut T>::offset_from_unsigned`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset_from_unsigned-1)
@@ -906,14 +906,14 @@ These previously stable APIs are now stable in const contexts:
906906
- [`char::is_whitespace`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.is_whitespace)
907907
- [`<[[T; N]]>::as_flattened`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_flattened)
908908
- [`<[[T; N]]>::as_flattened_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_flattened_mut)
909-
- [`String::into_bytes`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.into_bytes)
910-
- [`String::as_str`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.as_str)
911-
- [`String::capacity`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.capacity)
912-
- [`String::as_bytes`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.as_bytes)
913-
- [`String::len`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.len)
914-
- [`String::is_empty`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.is_empty)
915-
- [`String::as_mut_str`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.as_mut_str)
916-
- [`String::as_mut_vec`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.as_mut_vec)
909+
- [`String::into_bytes`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.into_bytes)
910+
- [`String::as_str`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.as_str)
911+
- [`String::capacity`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.capacity)
912+
- [`String::as_bytes`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.as_bytes)
913+
- [`String::len`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.len)
914+
- [`String::is_empty`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.is_empty)
915+
- [`String::as_mut_str`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.as_mut_str)
916+
- [`String::as_mut_vec`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.as_mut_vec)
917917
- [`Vec::as_ptr`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.as_ptr)
918918
- [`Vec::as_slice`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.as_slice)
919919
- [`Vec::capacity`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.capacity)
@@ -2965,7 +2965,7 @@ Stabilized APIs
29652965

29662966
- [`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)
29672967
- [`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)
2968-
- [`String::leak`](https://doc.rust-lang.org/stable/alloc/string/struct.String.html#method.leak)
2968+
- [`String::leak`](https://doc.rust-lang.org/stable/alloc/string/type.String.html#method.leak)
29692969

29702970
These APIs are now stable in const contexts:
29712971

@@ -5024,8 +5024,8 @@ and related tools.
50245024
[`collections::TryReserveError`]: https://doc.rust-lang.org/std/collections/struct.TryReserveError.html
50255025
[`HashMap::try_reserve`]: https://doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#method.try_reserve
50265026
[`HashSet::try_reserve`]: https://doc.rust-lang.org/std/collections/hash_set/struct.HashSet.html#method.try_reserve
5027-
[`String::try_reserve`]: https://doc.rust-lang.org/alloc/string/struct.String.html#method.try_reserve
5028-
[`String::try_reserve_exact`]: https://doc.rust-lang.org/alloc/string/struct.String.html#method.try_reserve_exact
5027+
[`String::try_reserve`]: https://doc.rust-lang.org/alloc/string/type.String.html#method.try_reserve
5028+
[`String::try_reserve_exact`]: https://doc.rust-lang.org/alloc/string/type.String.html#method.try_reserve_exact
50295029
[`Vec::try_reserve`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.try_reserve
50305030
[`Vec::try_reserve_exact`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.try_reserve_exact
50315031
[`VecDeque::try_reserve`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.try_reserve
@@ -5166,7 +5166,7 @@ and related tools.
51665166
[`BufWriter::into_parts`]: https://doc.rust-lang.org/stable/std/io/struct.BufWriter.html#method.into_parts
51675167
[`core::panic::{UnwindSafe, RefUnwindSafe, AssertUnwindSafe}`]: https://github.com/rust-lang/rust/pull/84662
51685168
[`Vec::shrink_to`]: https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.shrink_to
5169-
[`String::shrink_to`]: https://doc.rust-lang.org/stable/std/string/struct.String.html#method.shrink_to
5169+
[`String::shrink_to`]: https://doc.rust-lang.org/stable/std/string/type.String.html#method.shrink_to
51705170
[`OsString::shrink_to`]: https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.shrink_to
51715171
[`PathBuf::shrink_to`]: https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.shrink_to
51725172
[`BinaryHeap::shrink_to`]: https://doc.rust-lang.org/stable/std/collections/struct.BinaryHeap.html#method.shrink_to
@@ -9361,7 +9361,7 @@ Compatibility Notes
93619361
[`Iterator::try_for_each`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.try_for_each
93629362
[`NonNull::cast`]: https://doc.rust-lang.org/std/ptr/struct.NonNull.html#method.cast
93639363
[`Option::filter`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.filter
9364-
[`String::replace_range`]: https://doc.rust-lang.org/std/string/struct.String.html#method.replace_range
9364+
[`String::replace_range`]: https://doc.rust-lang.org/std/string/type.String.html#method.replace_range
93659365
[`Take::set_limit`]: https://doc.rust-lang.org/std/io/struct.Take.html#method.set_limit
93669366
[`hint::unreachable_unchecked`]: https://doc.rust-lang.org/std/hint/fn.unreachable_unchecked.html
93679367
[`os::unix::process::parent_id`]: https://doc.rust-lang.org/std/os/unix/process/fn.parent_id.html
@@ -9606,7 +9606,7 @@ Compatibility Notes
96069606
[`process::id`]: https://doc.rust-lang.org/std/process/fn.id.html
96079607
[`slice::rotate_left`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rotate_left
96089608
[`slice::rotate_right`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rotate_right
9609-
[`String::retain`]: https://doc.rust-lang.org/std/string/struct.String.html#method.retain
9609+
[`String::retain`]: https://doc.rust-lang.org/std/string/type.String.html#method.retain
96109610
[cargo/5041]: https://github.com/rust-lang/cargo/pull/5041
96119611
[cargo/5083]: https://github.com/rust-lang/cargo/pull/5083
96129612

@@ -11057,8 +11057,8 @@ Compatibility Notes
1105711057
[`Result::unwrap_or_default`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.unwrap_or_default
1105811058
[`SocketAddr::is_ipv4`]: https://doc.rust-lang.org/std/net/enum.SocketAddr.html#method.is_ipv4
1105911059
[`SocketAddr::is_ipv6`]: https://doc.rust-lang.org/std/net/enum.SocketAddr.html#method.is_ipv6
11060-
[`String::insert_str`]: https://doc.rust-lang.org/std/string/struct.String.html#method.insert_str
11061-
[`String::split_off`]: https://doc.rust-lang.org/std/string/struct.String.html#method.split_off
11060+
[`String::insert_str`]: https://doc.rust-lang.org/std/string/type.String.html#method.insert_str
11061+
[`String::split_off`]: https://doc.rust-lang.org/std/string/type.String.html#method.split_off
1106211062
[`Vec::dedup_by_key`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.dedup_by_key
1106311063
[`Vec::dedup_by`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.dedup_by
1106411064
[`VecDeque::resize`]: https://doc.rust-lang.org/std/collections/vec_deque/struct.VecDeque.html#method.resize
@@ -12972,8 +12972,8 @@ Compatibility Notes
1297212972
[`Ipv6Addr::is_unspecified`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#method.is_unspecified
1297312973
[`Path::strip_prefix`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.strip_prefix
1297412974
[`RandomState::new`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.RandomState.html#method.new
12975-
[`String::as_mut_str`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.as_mut_str
12976-
[`String::as_str`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.as_str
12975+
[`String::as_mut_str`]: http://doc.rust-lang.org/nightly/std/string/type.String.html#method.as_mut_str
12976+
[`String::as_str`]: http://doc.rust-lang.org/nightly/std/string/type.String.html#method.as_str
1297712977
[`Vec::as_mut_slice`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.as_mut_slice
1297812978
[`Vec::as_slice`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.as_slice
1297912979
[`clone_from_slice`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.clone_from_slice
@@ -13159,7 +13159,7 @@ Compatibility Notes
1315913159
[`os::unix::fs::DirBuilderExt::mode`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.DirBuilderExt.html#tymethod.mode
1316013160
[`os::unix::fs::DirBuilderExt`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.DirBuilderExt.html
1316113161
[`string::Drain`]: http://doc.rust-lang.org/nightly/std/string/struct.Drain.html
13162-
[`string::String::drain`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.drain
13162+
[`string::String::drain`]: http://doc.rust-lang.org/nightly/std/string/type.String.html#method.drain
1316313163
[`vec::Drain`]: http://doc.rust-lang.org/nightly/std/vec/struct.Drain.html
1316413164
[`vec::Vec::drain`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.drain
1316513165
[`vec_deque::Drain`]: http://doc.rust-lang.org/nightly/std/collections/vec_deque/struct.Drain.html
@@ -13508,7 +13508,7 @@ Miscellaneous
1350813508
[`Rc::make_mut`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.make_mut
1350913509
[`Rc::try_unwrap`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.try_unwrap
1351013510
[`Result::expect`]: http://doc.rust-lang.org/nightly/core/result/enum.Result.html#method.expect
13511-
[`String::into_boxed_str`]: http://doc.rust-lang.org/nightly/collections/string/struct.String.html#method.into_boxed_str
13511+
[`String::into_boxed_str`]: http://doc.rust-lang.org/nightly/collections/string/type.String.html#method.into_boxed_str
1351213512
[`TcpStream::read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.read_timeout
1351313513
[`TcpStream::set_read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_read_timeout
1351413514
[`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
@@ -2137,7 +2137,7 @@ impl<A: Allocator> generic::String<A> {
21372137
/// assert_eq!(s, "Test Results: ✅❌❌");
21382138
/// ```
21392139
///
2140-
/// [replacen]: ../../std/primitive.str.html#method.replacen
2140+
/// [replacen]: ../../../std/primitive.str.html#method.replacen
21412141
#[cfg(not(no_global_oom_handling))]
21422142
#[unstable(feature = "string_replace_in_place", issue = "147949")]
21432143
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
@@ -921,7 +921,7 @@ impl fmt::Debug for TypeId {
921921
/// ```rust
922922
/// assert_eq!(
923923
/// std::any::type_name::<Option<String>>(),
924-
/// "core::option::Option<alloc::string::String>",
924+
/// "core::option::Option<alloc::string::generic::String>",
925925
/// );
926926
/// ```
927927
#[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
@@ -2041,7 +2041,7 @@ pub const trait Iterator {
20412041
/// ```
20422042
///
20432043
/// [`iter`]: Iterator::next
2044-
/// [`String`]: ../../std/string/struct.String.html
2044+
/// [`String`]: ../../std/string/type.String.html
20452045
/// [`char`]: type@char
20462046
#[inline]
20472047
#[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
@@ -448,7 +448,7 @@ marker_impls! {
448448
/// while variables captured by mutable reference never implement `Copy`.
449449
///
450450
/// [`Vec<T>`]: ../../std/vec/struct.Vec.html
451-
/// [`String`]: ../../std/string/struct.String.html
451+
/// [`String`]: ../../std/string/type.String.html
452452
/// [`size_of::<T>`]: size_of
453453
/// [impls]: #implementors
454454
#[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`
@@ -2374,7 +2374,7 @@ impl<'a, T> const From<&'a Option<T>> for Option<&'a T> {
23742374
/// to the value inside the original.
23752375
///
23762376
/// [`map`]: Option::map
2377-
/// [String]: ../../std/string/struct.String.html "String"
2377+
/// [String]: ../../std/string/type.String.html "String"
23782378
///
23792379
/// ```
23802380
/// let s: Option<String> = Some(String::from("Hello, Rustaceans!"));

0 commit comments

Comments
 (0)