Skip to content

Commit 845e0ea

Browse files
committed
Update explicit-html-path doc links to String in docs, books, etc
1 parent fb69c03 commit 845e0ea

File tree

19 files changed

+37
-37
lines changed

19 files changed

+37
-37
lines changed

RELEASES.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -1735,7 +1735,7 @@ Stabilized APIs
17351735

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

17401740
These APIs are now stable in const contexts:
17411741

@@ -3794,8 +3794,8 @@ and related tools.
37943794
[`collections::TryReserveError`]: https://doc.rust-lang.org/std/collections/struct.TryReserveError.html
37953795
[`HashMap::try_reserve`]: https://doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#method.try_reserve
37963796
[`HashSet::try_reserve`]: https://doc.rust-lang.org/std/collections/hash_set/struct.HashSet.html#method.try_reserve
3797-
[`String::try_reserve`]: https://doc.rust-lang.org/alloc/string/struct.String.html#method.try_reserve
3798-
[`String::try_reserve_exact`]: https://doc.rust-lang.org/alloc/string/struct.String.html#method.try_reserve_exact
3797+
[`String::try_reserve`]: https://doc.rust-lang.org/alloc/string/type.String.html#method.try_reserve
3798+
[`String::try_reserve_exact`]: https://doc.rust-lang.org/alloc/string/type.String.html#method.try_reserve_exact
37993799
[`Vec::try_reserve`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.try_reserve
38003800
[`Vec::try_reserve_exact`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.try_reserve_exact
38013801
[`VecDeque::try_reserve`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.try_reserve
@@ -3936,7 +3936,7 @@ and related tools.
39363936
[`BufWriter::into_parts`]: https://doc.rust-lang.org/stable/std/io/struct.BufWriter.html#method.into_parts
39373937
[`core::panic::{UnwindSafe, RefUnwindSafe, AssertUnwindSafe}`]: https://github.com/rust-lang/rust/pull/84662
39383938
[`Vec::shrink_to`]: https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.shrink_to
3939-
[`String::shrink_to`]: https://doc.rust-lang.org/stable/std/string/struct.String.html#method.shrink_to
3939+
[`String::shrink_to`]: https://doc.rust-lang.org/stable/std/string/type.String.html#method.shrink_to
39403940
[`OsString::shrink_to`]: https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.shrink_to
39413941
[`PathBuf::shrink_to`]: https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.shrink_to
39423942
[`BinaryHeap::shrink_to`]: https://doc.rust-lang.org/stable/std/collections/struct.BinaryHeap.html#method.shrink_to
@@ -8131,7 +8131,7 @@ Compatibility Notes
81318131
[`Iterator::try_for_each`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.try_for_each
81328132
[`NonNull::cast`]: https://doc.rust-lang.org/std/ptr/struct.NonNull.html#method.cast
81338133
[`Option::filter`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.filter
8134-
[`String::replace_range`]: https://doc.rust-lang.org/std/string/struct.String.html#method.replace_range
8134+
[`String::replace_range`]: https://doc.rust-lang.org/std/string/type.String.html#method.replace_range
81358135
[`Take::set_limit`]: https://doc.rust-lang.org/std/io/struct.Take.html#method.set_limit
81368136
[`hint::unreachable_unchecked`]: https://doc.rust-lang.org/std/hint/fn.unreachable_unchecked.html
81378137
[`os::unix::process::parent_id`]: https://doc.rust-lang.org/std/os/unix/process/fn.parent_id.html
@@ -8376,7 +8376,7 @@ Compatibility Notes
83768376
[`process::id`]: https://doc.rust-lang.org/std/process/fn.id.html
83778377
[`slice::rotate_left`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rotate_left
83788378
[`slice::rotate_right`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rotate_right
8379-
[`String::retain`]: https://doc.rust-lang.org/std/string/struct.String.html#method.retain
8379+
[`String::retain`]: https://doc.rust-lang.org/std/string/type.String.html#method.retain
83808380
[cargo/5041]: https://github.com/rust-lang/cargo/pull/5041
83818381
[cargo/5083]: https://github.com/rust-lang/cargo/pull/5083
83828382

@@ -9827,8 +9827,8 @@ Compatibility Notes
98279827
[`Result::unwrap_or_default`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.unwrap_or_default
98289828
[`SocketAddr::is_ipv4`]: https://doc.rust-lang.org/std/net/enum.SocketAddr.html#method.is_ipv4
98299829
[`SocketAddr::is_ipv6`]: https://doc.rust-lang.org/std/net/enum.SocketAddr.html#method.is_ipv6
9830-
[`String::insert_str`]: https://doc.rust-lang.org/std/string/struct.String.html#method.insert_str
9831-
[`String::split_off`]: https://doc.rust-lang.org/std/string/struct.String.html#method.split_off
9830+
[`String::insert_str`]: https://doc.rust-lang.org/std/string/type.String.html#method.insert_str
9831+
[`String::split_off`]: https://doc.rust-lang.org/std/string/type.String.html#method.split_off
98329832
[`Vec::dedup_by_key`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.dedup_by_key
98339833
[`Vec::dedup_by`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.dedup_by
98349834
[`VecDeque::resize`]: https://doc.rust-lang.org/std/collections/vec_deque/struct.VecDeque.html#method.resize
@@ -11742,8 +11742,8 @@ Compatibility Notes
1174211742
[`Ipv6Addr::is_unspecified`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#method.is_unspecified
1174311743
[`Path::strip_prefix`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.strip_prefix
1174411744
[`RandomState::new`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.RandomState.html#method.new
11745-
[`String::as_mut_str`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.as_mut_str
11746-
[`String::as_str`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.as_str
11745+
[`String::as_mut_str`]: http://doc.rust-lang.org/nightly/std/string/type.String.html#method.as_mut_str
11746+
[`String::as_str`]: http://doc.rust-lang.org/nightly/std/string/type.String.html#method.as_str
1174711747
[`Vec::as_mut_slice`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.as_mut_slice
1174811748
[`Vec::as_slice`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.as_slice
1174911749
[`clone_from_slice`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.clone_from_slice
@@ -11929,7 +11929,7 @@ Compatibility Notes
1192911929
[`os::unix::fs::DirBuilderExt::mode`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.DirBuilderExt.html#tymethod.mode
1193011930
[`os::unix::fs::DirBuilderExt`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.DirBuilderExt.html
1193111931
[`string::Drain`]: http://doc.rust-lang.org/nightly/std/string/struct.Drain.html
11932-
[`string::String::drain`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.drain
11932+
[`string::String::drain`]: http://doc.rust-lang.org/nightly/std/string/type.String.html#method.drain
1193311933
[`vec::Drain`]: http://doc.rust-lang.org/nightly/std/vec/struct.Drain.html
1193411934
[`vec::Vec::drain`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.drain
1193511935
[`vec_deque::Drain`]: http://doc.rust-lang.org/nightly/std/collections/vec_deque/struct.Drain.html

library/core/src/borrow.rs

+2-2
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
pub trait Borrow<Borrowed: ?Sized> {

library/core/src/char/methods.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ impl char {
7575
/// decoding error.
7676
///
7777
/// It can occur, for example, when giving ill-formed UTF-8 bytes to
78-
/// [`String::from_utf8_lossy`](../std/string/struct.String.html#method.from_utf8_lossy).
78+
/// [`String::from_utf8_lossy`](../std/string/type.String.html#method.from_utf8_lossy).
7979
#[stable(feature = "assoc_char_consts", since = "1.52.0")]
8080
pub const REPLACEMENT_CHARACTER: char = '\u{FFFD}';
8181

library/core/src/convert/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ pub const fn identity<T>(x: T) -> T {
200200
/// [`Borrow`]: crate::borrow::Borrow
201201
/// [`Eq`]: crate::cmp::Eq
202202
/// [`Ord`]: crate::cmp::Ord
203-
/// [`String`]: ../../std/string/struct.String.html
203+
/// [`String`]: ../../std/string/type.String.html
204204
///
205205
/// ```
206206
/// fn is_hello<T: AsRef<str>>(s: T) {
@@ -439,7 +439,7 @@ pub trait AsMut<T: ?Sized> {
439439
/// is_hello(s);
440440
/// ```
441441
///
442-
/// [`String`]: ../../std/string/struct.String.html
442+
/// [`String`]: ../../std/string/type.String.html
443443
/// [`Vec`]: ../../std/vec/struct.Vec.html
444444
#[rustc_diagnostic_item = "Into"]
445445
#[stable(feature = "rust1", since = "1.0.0")]
@@ -569,7 +569,7 @@ pub trait Into<T>: Sized {
569569
/// }
570570
/// ```
571571
///
572-
/// [`String`]: ../../std/string/struct.String.html
572+
/// [`String`]: ../../std/string/type.String.html
573573
/// [`from`]: From::from
574574
/// [book]: ../../book/ch09-00-error-handling.html
575575
#[rustc_diagnostic_item = "From"]

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1958,7 +1958,7 @@ pub trait Iterator {
19581958
/// ```
19591959
///
19601960
/// [`iter`]: Iterator::next
1961-
/// [`String`]: ../../std/string/struct.String.html
1961+
/// [`String`]: ../../std/string/type.String.html
19621962
/// [`char`]: type@char
19631963
#[inline]
19641964
#[stable(feature = "rust1", since = "1.0.0")]

library/core/src/marker.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ marker_impls! {
404404
/// while variables captured by mutable reference never implement `Copy`.
405405
///
406406
/// [`Vec<T>`]: ../../std/vec/struct.Vec.html
407-
/// [`String`]: ../../std/string/struct.String.html
407+
/// [`String`]: ../../std/string/type.String.html
408408
/// [`size_of::<T>`]: crate::mem::size_of
409409
/// [impls]: #implementors
410410
#[stable(feature = "rust1", since = "1.0.0")]

library/core/src/ops/deref.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
/// [method resolution]: ../../reference/expressions/method-call-expr.html
101101
/// [type coercions]: ../../reference/type-coercions.html
102102
/// [box]: ../../alloc/boxed/struct.Box.html
103-
/// [string]: ../../alloc/string/struct.String.html
103+
/// [string]: ../../alloc/string/type.String.html
104104
/// [vec]: ../../alloc/vec/struct.Vec.html
105105
/// [rc]: ../../alloc/rc/struct.Rc.html
106106
/// [cow]: ../../alloc/borrow/enum.Cow.html
@@ -226,7 +226,7 @@ impl<T: ?Sized> const Deref for &mut T {
226226
/// [method resolution]: ../../reference/expressions/method-call-expr.html
227227
/// [type coercions]: ../../reference/type-coercions.html
228228
/// [box]: ../../alloc/boxed/struct.Box.html
229-
/// [string]: ../../alloc/string/struct.String.html
229+
/// [string]: ../../alloc/string/type.String.html
230230
/// [rc]: ../../alloc/rc/struct.Rc.html
231231
/// [cow]: ../../alloc/borrow/enum.Cow.html
232232
///

library/core/src/option.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -690,8 +690,8 @@ impl<T> Option<T> {
690690
/// reference to the value inside the original.
691691
///
692692
/// [`map`]: Option::map
693-
/// [String]: ../../std/string/struct.String.html "String"
694-
/// [`String`]: ../../std/string/struct.String.html "String"
693+
/// [String]: ../../std/string/type.String.html "String"
694+
/// [`String`]: ../../std/string/type.String.html "String"
695695
///
696696
/// ```
697697
/// let text: Option<String> = Some("Hello, world!".to_string());
@@ -1099,7 +1099,7 @@ impl<T> Option<T> {
10991099
/// Calculates the length of an <code>Option<[String]></code> as an
11001100
/// <code>Option<[usize]></code>, consuming the original:
11011101
///
1102-
/// [String]: ../../std/string/struct.String.html "String"
1102+
/// [String]: ../../std/string/type.String.html "String"
11031103
/// ```
11041104
/// let maybe_some_string = Some(String::from("Hello, World!"));
11051105
/// // `Option::map` takes self *by value*, consuming `maybe_some_string`
@@ -2138,7 +2138,7 @@ impl<'a, T> From<&'a Option<T>> for Option<&'a T> {
21382138
/// to the value inside the original.
21392139
///
21402140
/// [`map`]: Option::map
2141-
/// [String]: ../../std/string/struct.String.html "String"
2141+
/// [String]: ../../std/string/type.String.html "String"
21422142
///
21432143
/// ```
21442144
/// let s: Option<String> = Some(String::from("Hello, Rustaceans!"));

library/core/src/pin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@
916916
//! [`Vec::set_len`]: ../../std/vec/struct.Vec.html#method.set_len
917917
//! [`VecDeque<T>`]: ../../std/collections/struct.VecDeque.html
918918
//! [VecDeque]: ../../std/collections/struct.VecDeque.html "collections::VecDeque"
919-
//! [`String`]: ../../std/string/struct.String.html "String"
919+
//! [`String`]: ../../std/string/type.String.html "String"
920920
921921
#![stable(feature = "pin", since = "1.33.0")]
922922

library/core/src/primitive_docs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ mod prim_bool {}
188188
/// because `!` coerces to `Result<!, ConnectionError>` automatically.
189189
///
190190
/// [`String::from_str`]: str::FromStr::from_str
191-
/// [`String`]: ../std/string/struct.String.html
191+
/// [`String`]: ../std/string/type.String.html
192192
/// [`FromStr`]: str::FromStr
193193
///
194194
/// # `!` and traits
@@ -406,7 +406,7 @@ mod prim_never {}
406406
/// assert_eq!(5, s.len() * std::mem::size_of::<u8>());
407407
/// ```
408408
///
409-
/// [`String`]: ../std/string/struct.String.html
409+
/// [`String`]: ../std/string/type.String.html
410410
///
411411
/// As always, remember that a human intuition for 'character' might not map to
412412
/// Unicode's definitions. For example, despite looking similar, the 'é'

library/core/src/str/converts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use crate::{mem, ptr};
2323
/// If you need a `String` instead of a `&str`, consider
2424
/// [`String::from_utf8`][string].
2525
///
26-
/// [string]: ../../std/string/struct.String.html#method.from_utf8
26+
/// [string]: ../../std/string/type.String.html#method.from_utf8
2727
///
2828
/// Because you can stack-allocate a `[u8; N]`, and you can take a
2929
/// [`&[u8]`][byteslice] of it, this function is one way to have a

library/core/src/str/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::fmt;
99
/// As such, the `from_utf8` family of functions and methods for both [`String`]s
1010
/// and [`&str`]s make use of this error, for example.
1111
///
12-
/// [`String`]: ../../std/string/struct.String.html#method.from_utf8
12+
/// [`String`]: ../../std/string/type.String.html#method.from_utf8
1313
/// [`&str`]: super::from_utf8
1414
///
1515
/// # Examples

library/core/src/str/lossy.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ impl fmt::Debug for Debug<'_> {
172172
/// }
173173
/// ```
174174
///
175-
/// [`String::from_utf8_lossy`]: ../../std/string/struct.String.html#method.from_utf8_lossy
175+
/// [`String::from_utf8_lossy`]: ../../std/string/type.String.html#method.from_utf8_lossy
176176
#[must_use = "iterators are lazy and do nothing unless consumed"]
177177
#[stable(feature = "utf8_chunks", since = "1.79.0")]
178178
#[derive(Clone)]

library/core/src/task/poll.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ impl<T> Poll<T> {
3535
/// Converts a <code>Poll<[String]></code> into a <code>Poll<[usize]></code>, consuming
3636
/// the original:
3737
///
38-
/// [String]: ../../std/string/struct.String.html "String"
38+
/// [String]: ../../std/string/type.String.html "String"
3939
/// ```
4040
/// # use core::task::Poll;
4141
/// let poll_some_string = Poll::Ready(String::from("Hello, World!"));

library/std/src/panic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl<'a> PanicHookInfo<'a> {
6868
/// (or, in Rust 2018 and earlier, `panic!(x)` where `x` is something other than a string)
6969
/// can result in a panic payload other than a `&'static str` or `String`.
7070
///
71-
/// [`String`]: ../../std/string/struct.String.html
71+
/// [`String`]: ../../std/string/type.String.html
7272
///
7373
/// # Examples
7474
///

src/doc/book

src/doc/unstable-book/src/language-features/string-deref-patterns.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ pub fn is_it_the_answer(value: Value) -> bool {
4242
}
4343
```
4444

45-
[its `Deref` implementation]: https://doc.rust-lang.org/std/string/struct.String.html#impl-Deref-for-String
45+
[its `Deref` implementation]: https://doc.rust-lang.org/std/string/type.String.html#impl-Deref-for-String

src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10850,7 +10850,7 @@ pub fn is_it_the_answer(value: Value) -> bool {
1085010850
}
1085110851
```
1085210852

10853-
[its `Deref` implementation]: https://doc.rust-lang.org/std/string/struct.String.html#impl-Deref-for-String
10853+
[its `Deref` implementation]: https://doc.rust-lang.org/std/string/type.String.html#impl-Deref-for-String
1085410854
"##,
1085510855
default_severity: Severity::Allow,
1085610856
warn_since: None,

0 commit comments

Comments
 (0)