Skip to content

Commit 0bf92d7

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 17223a0 commit 0bf92d7

29 files changed

Lines changed: 89 additions & 70 deletions

RELEASES.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,8 @@ Stabilized APIs
569569
- [`impl PartialEq<String> for PathBuf`](https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#impl-PartialEq%3CString%3E-for-PathBuf)
570570
- [`impl PartialEq<str> for Path`](https://doc.rust-lang.org/stable/std/path/struct.Path.html#impl-PartialEq%3Cstr%3E-for-Path)
571571
- [`impl PartialEq<String> for Path`](https://doc.rust-lang.org/stable/std/path/struct.Path.html#impl-PartialEq%3CString%3E-for-Path)
572-
- [`impl PartialEq<PathBuf> for String`](https://doc.rust-lang.org/stable/std/string/struct.String.html#impl-PartialEq%3CPathBuf%3E-for-String)
573-
- [`impl PartialEq<Path> for String`](https://doc.rust-lang.org/stable/std/string/struct.String.html#impl-PartialEq%3CPath%3E-for-String)
572+
- [`impl PartialEq<PathBuf> for String`](https://doc.rust-lang.org/stable/std/string/type.String.html#impl-PartialEq%3CPathBuf%3E-for-String)
573+
- [`impl PartialEq<Path> for String`](https://doc.rust-lang.org/stable/std/string/type.String.html#impl-PartialEq%3CPath%3E-for-String)
574574
- [`impl PartialEq<PathBuf> for str`](https://doc.rust-lang.org/stable/std/primitive.str.html#impl-PartialEq%3CPathBuf%3E-for-str)
575575
- [`impl PartialEq<Path> for str`](https://doc.rust-lang.org/stable/std/primitive.str.html#impl-PartialEq%3CPath%3E-for-str)
576576
- [`Ipv4Addr::from_octets`](https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.from_octets)
@@ -1120,7 +1120,7 @@ Stabilized APIs
11201120
- [`<[T]>::split_off_first_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off_first_mut)
11211121
- [`<[T]>::split_off_last`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off_last)
11221122
- [`<[T]>::split_off_last_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_off_last_mut)
1123-
- [`String::extend_from_within`](https://doc.rust-lang.org/stable/alloc/string/struct.String.html#method.extend_from_within)
1123+
- [`String::extend_from_within`](https://doc.rust-lang.org/stable/alloc/string/type.String.html#method.extend_from_within)
11241124
- [`os_str::Display`](https://doc.rust-lang.org/stable/std/ffi/os_str/struct.Display.html)
11251125
- [`OsString::display`](https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.display)
11261126
- [`OsStr::display`](https://doc.rust-lang.org/stable/std/ffi/struct.OsStr.html#method.display)
@@ -1134,7 +1134,7 @@ Stabilized APIs
11341134
- [`impl From<PipeReader> for OwnedFd`](https://doc.rust-lang.org/stable/std/os/fd/struct.OwnedFd.html#impl-From%3CPipeReader%3E-for-OwnedFd)
11351135
- [`impl From<PipeWriter> for OwnedFd`](https://doc.rust-lang.org/stable/std/os/fd/struct.OwnedFd.html#impl-From%3CPipeWriter%3E-for-OwnedFd)
11361136
- [`Box<MaybeUninit<T>>::write`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.write)
1137-
- [`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)
1137+
- [`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)
11381138
- [`<*const T>::offset_from_unsigned`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset_from_unsigned)
11391139
- [`<*const T>::byte_offset_from_unsigned`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.byte_offset_from_unsigned)
11401140
- [`<*mut T>::offset_from_unsigned`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset_from_unsigned-1)
@@ -1172,14 +1172,14 @@ These previously stable APIs are now stable in const contexts:
11721172
- [`char::is_whitespace`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.is_whitespace)
11731173
- [`<[[T; N]]>::as_flattened`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_flattened)
11741174
- [`<[[T; N]]>::as_flattened_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_flattened_mut)
1175-
- [`String::into_bytes`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.into_bytes)
1176-
- [`String::as_str`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.as_str)
1177-
- [`String::capacity`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.capacity)
1178-
- [`String::as_bytes`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.as_bytes)
1179-
- [`String::len`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.len)
1180-
- [`String::is_empty`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.is_empty)
1181-
- [`String::as_mut_str`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.as_mut_str)
1182-
- [`String::as_mut_vec`](https://doc.rust-lang.org/stable/std/string/struct.String.html#method.as_mut_vec)
1175+
- [`String::into_bytes`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.into_bytes)
1176+
- [`String::as_str`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.as_str)
1177+
- [`String::capacity`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.capacity)
1178+
- [`String::as_bytes`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.as_bytes)
1179+
- [`String::len`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.len)
1180+
- [`String::is_empty`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.is_empty)
1181+
- [`String::as_mut_str`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.as_mut_str)
1182+
- [`String::as_mut_vec`](https://doc.rust-lang.org/stable/std/string/type.String.html#method.as_mut_vec)
11831183
- [`Vec::as_ptr`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.as_ptr)
11841184
- [`Vec::as_slice`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.as_slice)
11851185
- [`Vec::capacity`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.capacity)
@@ -3231,7 +3231,7 @@ Stabilized APIs
32313231

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

32363236
These APIs are now stable in const contexts:
32373237

@@ -5290,8 +5290,8 @@ and related tools.
52905290
[`collections::TryReserveError`]: https://doc.rust-lang.org/std/collections/struct.TryReserveError.html
52915291
[`HashMap::try_reserve`]: https://doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#method.try_reserve
52925292
[`HashSet::try_reserve`]: https://doc.rust-lang.org/std/collections/hash_set/struct.HashSet.html#method.try_reserve
5293-
[`String::try_reserve`]: https://doc.rust-lang.org/alloc/string/struct.String.html#method.try_reserve
5294-
[`String::try_reserve_exact`]: https://doc.rust-lang.org/alloc/string/struct.String.html#method.try_reserve_exact
5293+
[`String::try_reserve`]: https://doc.rust-lang.org/alloc/string/type.String.html#method.try_reserve
5294+
[`String::try_reserve_exact`]: https://doc.rust-lang.org/alloc/string/type.String.html#method.try_reserve_exact
52955295
[`Vec::try_reserve`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.try_reserve
52965296
[`Vec::try_reserve_exact`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.try_reserve_exact
52975297
[`VecDeque::try_reserve`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.try_reserve
@@ -5432,7 +5432,7 @@ and related tools.
54325432
[`BufWriter::into_parts`]: https://doc.rust-lang.org/stable/std/io/struct.BufWriter.html#method.into_parts
54335433
[`core::panic::{UnwindSafe, RefUnwindSafe, AssertUnwindSafe}`]: https://github.com/rust-lang/rust/pull/84662
54345434
[`Vec::shrink_to`]: https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.shrink_to
5435-
[`String::shrink_to`]: https://doc.rust-lang.org/stable/std/string/struct.String.html#method.shrink_to
5435+
[`String::shrink_to`]: https://doc.rust-lang.org/stable/std/string/type.String.html#method.shrink_to
54365436
[`OsString::shrink_to`]: https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.shrink_to
54375437
[`PathBuf::shrink_to`]: https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.shrink_to
54385438
[`BinaryHeap::shrink_to`]: https://doc.rust-lang.org/stable/std/collections/struct.BinaryHeap.html#method.shrink_to
@@ -9627,7 +9627,7 @@ Compatibility Notes
96279627
[`Iterator::try_for_each`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.try_for_each
96289628
[`NonNull::cast`]: https://doc.rust-lang.org/std/ptr/struct.NonNull.html#method.cast
96299629
[`Option::filter`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.filter
9630-
[`String::replace_range`]: https://doc.rust-lang.org/std/string/struct.String.html#method.replace_range
9630+
[`String::replace_range`]: https://doc.rust-lang.org/std/string/type.String.html#method.replace_range
96319631
[`Take::set_limit`]: https://doc.rust-lang.org/std/io/struct.Take.html#method.set_limit
96329632
[`hint::unreachable_unchecked`]: https://doc.rust-lang.org/std/hint/fn.unreachable_unchecked.html
96339633
[`os::unix::process::parent_id`]: https://doc.rust-lang.org/std/os/unix/process/fn.parent_id.html
@@ -9872,7 +9872,7 @@ Compatibility Notes
98729872
[`process::id`]: https://doc.rust-lang.org/std/process/fn.id.html
98739873
[`slice::rotate_left`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rotate_left
98749874
[`slice::rotate_right`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rotate_right
9875-
[`String::retain`]: https://doc.rust-lang.org/std/string/struct.String.html#method.retain
9875+
[`String::retain`]: https://doc.rust-lang.org/std/string/type.String.html#method.retain
98769876
[cargo/5041]: https://github.com/rust-lang/cargo/pull/5041
98779877
[cargo/5083]: https://github.com/rust-lang/cargo/pull/5083
98789878

@@ -11323,8 +11323,8 @@ Compatibility Notes
1132311323
[`Result::unwrap_or_default`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.unwrap_or_default
1132411324
[`SocketAddr::is_ipv4`]: https://doc.rust-lang.org/std/net/enum.SocketAddr.html#method.is_ipv4
1132511325
[`SocketAddr::is_ipv6`]: https://doc.rust-lang.org/std/net/enum.SocketAddr.html#method.is_ipv6
11326-
[`String::insert_str`]: https://doc.rust-lang.org/std/string/struct.String.html#method.insert_str
11327-
[`String::split_off`]: https://doc.rust-lang.org/std/string/struct.String.html#method.split_off
11326+
[`String::insert_str`]: https://doc.rust-lang.org/std/string/type.String.html#method.insert_str
11327+
[`String::split_off`]: https://doc.rust-lang.org/std/string/type.String.html#method.split_off
1132811328
[`Vec::dedup_by_key`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.dedup_by_key
1132911329
[`Vec::dedup_by`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.dedup_by
1133011330
[`VecDeque::resize`]: https://doc.rust-lang.org/std/collections/vec_deque/struct.VecDeque.html#method.resize
@@ -13238,8 +13238,8 @@ Compatibility Notes
1323813238
[`Ipv6Addr::is_unspecified`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#method.is_unspecified
1323913239
[`Path::strip_prefix`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.strip_prefix
1324013240
[`RandomState::new`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.RandomState.html#method.new
13241-
[`String::as_mut_str`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.as_mut_str
13242-
[`String::as_str`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.as_str
13241+
[`String::as_mut_str`]: http://doc.rust-lang.org/nightly/std/string/type.String.html#method.as_mut_str
13242+
[`String::as_str`]: http://doc.rust-lang.org/nightly/std/string/type.String.html#method.as_str
1324313243
[`Vec::as_mut_slice`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.as_mut_slice
1324413244
[`Vec::as_slice`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.as_slice
1324513245
[`clone_from_slice`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.clone_from_slice
@@ -13425,7 +13425,7 @@ Compatibility Notes
1342513425
[`os::unix::fs::DirBuilderExt::mode`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.DirBuilderExt.html#tymethod.mode
1342613426
[`os::unix::fs::DirBuilderExt`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.DirBuilderExt.html
1342713427
[`string::Drain`]: http://doc.rust-lang.org/nightly/std/string/struct.Drain.html
13428-
[`string::String::drain`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.drain
13428+
[`string::String::drain`]: http://doc.rust-lang.org/nightly/std/string/type.String.html#method.drain
1342913429
[`vec::Drain`]: http://doc.rust-lang.org/nightly/std/vec/struct.Drain.html
1343013430
[`vec::Vec::drain`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.drain
1343113431
[`vec_deque::Drain`]: http://doc.rust-lang.org/nightly/std/collections/vec_deque/struct.Drain.html
@@ -13774,7 +13774,7 @@ Miscellaneous
1377413774
[`Rc::make_mut`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.make_mut
1377513775
[`Rc::try_unwrap`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.try_unwrap
1377613776
[`Result::expect`]: http://doc.rust-lang.org/nightly/core/result/enum.Result.html#method.expect
13777-
[`String::into_boxed_str`]: http://doc.rust-lang.org/nightly/collections/string/struct.String.html#method.into_boxed_str
13777+
[`String::into_boxed_str`]: http://doc.rust-lang.org/nightly/collections/string/type.String.html#method.into_boxed_str
1377813778
[`TcpStream::read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.read_timeout
1377913779
[`TcpStream::set_read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_read_timeout
1378013780
[`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
@@ -2069,7 +2069,7 @@ pub const trait Iterator {
20692069
/// ```
20702070
///
20712071
/// [`iter`]: Iterator::next
2072-
/// [`String`]: ../../std/string/struct.String.html
2072+
/// [`String`]: ../../std/string/type.String.html
20732073
/// [`char`]: type@char
20742074
#[inline]
20752075
#[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
@@ -445,7 +445,7 @@ marker_impls! {
445445
/// while variables captured by mutable reference never implement `Copy`.
446446
///
447447
/// [`Vec<T>`]: ../../std/vec/struct.Vec.html
448-
/// [`String`]: ../../std/string/struct.String.html
448+
/// [`String`]: ../../std/string/type.String.html
449449
/// [`size_of::<T>`]: size_of
450450
/// [impls]: #implementors
451451
#[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
@@ -725,8 +725,8 @@ impl<T> Option<T> {
725725
/// reference to the value inside the original.
726726
///
727727
/// [`map`]: Option::map
728-
/// [String]: ../../std/string/struct.String.html "String"
729-
/// [`String`]: ../../std/string/struct.String.html "String"
728+
/// [String]: ../../std/string/type.String.html "String"
729+
/// [`String`]: ../../std/string/type.String.html "String"
730730
///
731731
/// ```
732732
/// let text: Option<String> = Some("Hello, world!".to_string());
@@ -1141,7 +1141,7 @@ impl<T> Option<T> {
11411141
/// Calculates the length of an <code>Option<[String]></code> as an
11421142
/// <code>Option<[usize]></code>, consuming the original:
11431143
///
1144-
/// [String]: ../../std/string/struct.String.html "String"
1144+
/// [String]: ../../std/string/type.String.html "String"
11451145
/// ```
11461146
/// let maybe_some_string = Some(String::from("Hello, World!"));
11471147
/// // `Option::map` takes self *by value*, consuming `maybe_some_string`
@@ -2386,7 +2386,7 @@ impl<'a, T> const From<&'a Option<T>> for Option<&'a T> {
23862386
/// to the value inside the original.
23872387
///
23882388
/// [`map`]: Option::map
2389-
/// [String]: ../../std/string/struct.String.html "String"
2389+
/// [String]: ../../std/string/type.String.html "String"
23902390
///
23912391
/// ```
23922392
/// let s: Option<String> = Some(String::from("Hello, Rustaceans!"));

0 commit comments

Comments
 (0)