Skip to content

Commit d00c703

Browse files
authored
Rollup merge of #75369 - denisvasilik:intra-doc-links-core-borrow, r=Manishearth
Move to intra-doc links in /library/core/src/borrow.rs Helps with #75080. @rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc Known issues: * Links from `core` to `std` (#74481): * [`Box<T>`] * [`Mutex<T>`] * [`Rc<T>`] * [`String`] * [`HashMap<K, V>`]
2 parents 51ed33d + d7e7271 commit d00c703

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

library/core/src/borrow.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,12 @@
4040
/// provide a reference to related type `T`, it is often better to use
4141
/// [`AsRef<T>`] as more types can safely implement it.
4242
///
43-
/// [`AsRef<T>`]: ../../std/convert/trait.AsRef.html
44-
/// [`BorrowMut<T>`]: trait.BorrowMut.html
43+
/// [`BorrowMut<T>`]: BorrowMut
4544
/// [`Box<T>`]: ../../std/boxed/struct.Box.html
4645
/// [`Mutex<T>`]: ../../std/sync/struct.Mutex.html
4746
/// [`Rc<T>`]: ../../std/rc/struct.Rc.html
48-
/// [`str`]: ../../std/primitive.str.html
4947
/// [`String`]: ../../std/string/struct.String.html
50-
/// [`borrow`]: #tymethod.borrow
48+
/// [`borrow`]: Borrow::borrow
5149
///
5250
/// # Examples
5351
///
@@ -152,10 +150,9 @@
152150
/// If it wants to allow others access to the underlying `str`, it can do
153151
/// that via `AsRef<str>` which doesn’t carry any extra requirements.
154152
///
155-
/// [`Hash`]: ../../std/hash/trait.Hash.html
153+
/// [`Hash`]: crate::hash::Hash
156154
/// [`HashMap<K, V>`]: ../../std/collections/struct.HashMap.html
157155
/// [`String`]: ../../std/string/struct.String.html
158-
/// [`str`]: ../../std/primitive.str.html
159156
#[stable(feature = "rust1", since = "1.0.0")]
160157
pub trait Borrow<Borrowed: ?Sized> {
161158
/// Immutably borrows from an owned value.
@@ -187,7 +184,7 @@ pub trait Borrow<Borrowed: ?Sized> {
187184
/// an underlying type by providing a mutable reference. See [`Borrow<T>`]
188185
/// for more information on borrowing as another type.
189186
///
190-
/// [`Borrow<T>`]: trait.Borrow.html
187+
/// [`Borrow<T>`]: Borrow
191188
#[stable(feature = "rust1", since = "1.0.0")]
192189
pub trait BorrowMut<Borrowed: ?Sized>: Borrow<Borrowed> {
193190
/// Mutably borrows from an owned value.

0 commit comments

Comments
 (0)