Skip to content

Commit 11f6979

Browse files
Move to intra-doc links for task.rs and vec.rs
1 parent 2c3dc04 commit 11f6979

File tree

2 files changed

+19
-36
lines changed

2 files changed

+19
-36
lines changed

library/alloc/src/task.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@ use crate::sync::Arc;
1313
///
1414
/// This trait is a memory-safe and ergonomic alternative to constructing a
1515
/// [`RawWaker`]. It supports the common executor design in which the data used
16-
/// to wake up a task is stored in an [`Arc`][arc]. Some executors (especially
16+
/// to wake up a task is stored in an [`Arc`]. Some executors (especially
1717
/// those for embedded systems) cannot use this API, which is why [`RawWaker`]
1818
/// exists as an alternative for those systems.
19-
///
20-
/// [arc]: ../../std/sync/struct.Arc.html
2119
#[unstable(feature = "wake_trait", issue = "69912")]
2220
pub trait Wake {
2321
/// Wake this task.

library/alloc/src/vec.rs

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,9 @@
5050
//! v[1] = v[1] + 5;
5151
//! ```
5252
//!
53-
//! [`Vec<T>`]: ../../std/vec/struct.Vec.html
54-
//! [`new`]: ../../std/vec/struct.Vec.html#method.new
55-
//! [`push`]: ../../std/vec/struct.Vec.html#method.push
56-
//! [`Index`]: ../../std/ops/trait.Index.html
57-
//! [`IndexMut`]: ../../std/ops/trait.IndexMut.html
58-
//! [`vec!`]: ../../std/macro.vec.html
53+
//! [`Vec<T>`]: Vec
54+
//! [`new`]: Vec::new
55+
//! [`push`]: Vec::push
5956
6057
#![stable(feature = "rust1", since = "1.0.0")]
6158

@@ -278,22 +275,18 @@ use crate::raw_vec::RawVec;
278275
/// `Vec` does not currently guarantee the order in which elements are dropped.
279276
/// The order has changed in the past and may change again.
280277
///
281-
/// [`vec!`]: ../../std/macro.vec.html
282278
/// [`get`]: ../../std/vec/struct.Vec.html#method.get
283279
/// [`get_mut`]: ../../std/vec/struct.Vec.html#method.get_mut
284-
/// [`Index`]: ../../std/ops/trait.Index.html
285-
/// [`String`]: ../../std/string/struct.String.html
286-
/// [`&str`]: ../../std/primitive.str.html
287-
/// [`Vec::with_capacity`]: ../../std/vec/struct.Vec.html#method.with_capacity
288-
/// [`Vec::new`]: ../../std/vec/struct.Vec.html#method.new
289-
/// [`shrink_to_fit`]: ../../std/vec/struct.Vec.html#method.shrink_to_fit
290-
/// [`capacity`]: ../../std/vec/struct.Vec.html#method.capacity
291-
/// [`mem::size_of::<T>`]: ../../std/mem/fn.size_of.html
292-
/// [`len`]: ../../std/vec/struct.Vec.html#method.len
293-
/// [`push`]: ../../std/vec/struct.Vec.html#method.push
294-
/// [`insert`]: ../../std/vec/struct.Vec.html#method.insert
295-
/// [`reserve`]: ../../std/vec/struct.Vec.html#method.reserve
296-
/// [owned slice]: ../../std/boxed/struct.Box.html
280+
/// [`String`]: crate::string::String
281+
/// [`&str`]: type@str
282+
/// [`shrink_to_fit`]: Vec::shrink_to_fit
283+
/// [`capacity`]: Vec::capacity
284+
/// [`mem::size_of::<T>`]: core::mem::size_of
285+
/// [`len`]: Vec::len
286+
/// [`push`]: Vec::push
287+
/// [`insert`]: Vec::insert
288+
/// [`reserve`]: Vec::reserve
289+
/// [owned slice]: Box
297290
#[stable(feature = "rust1", since = "1.0.0")]
298291
#[cfg_attr(not(test), rustc_diagnostic_item = "vec_type")]
299292
pub struct Vec<T> {
@@ -430,8 +423,8 @@ impl<T> Vec<T> {
430423
/// that nothing else uses the pointer after calling this
431424
/// function.
432425
///
433-
/// [`String`]: ../../std/string/struct.String.html
434-
/// [`dealloc`]: ../../alloc/alloc/trait.GlobalAlloc.html#tymethod.dealloc
426+
/// [`String`]: crate::string::String
427+
/// [`dealloc`]: crate::alloc::GlobalAlloc::dealloc
435428
///
436429
/// # Examples
437430
///
@@ -658,7 +651,7 @@ impl<T> Vec<T> {
658651
///
659652
/// Note that this will drop any excess capacity.
660653
///
661-
/// [owned slice]: ../../std/boxed/struct.Box.html
654+
/// [owned slice]: Box
662655
///
663656
/// # Examples
664657
///
@@ -867,7 +860,7 @@ impl<T> Vec<T> {
867860
///
868861
/// [`truncate`]: #method.truncate
869862
/// [`resize`]: #method.resize
870-
/// [`extend`]: ../../std/iter/trait.Extend.html#tymethod.extend
863+
/// [`extend`]: Extend::extend
871864
/// [`clear`]: #method.clear
872865
///
873866
/// # Safety
@@ -1214,8 +1207,6 @@ impl<T> Vec<T> {
12141207
/// Removes the last element from a vector and returns it, or [`None`] if it
12151208
/// is empty.
12161209
///
1217-
/// [`None`]: ../../std/option/enum.Option.html#variant.None
1218-
///
12191210
/// # Examples
12201211
///
12211212
/// ```
@@ -1480,7 +1471,6 @@ impl<T> Vec<T> {
14801471
/// ```
14811472
///
14821473
/// [`resize`]: #method.resize
1483-
/// [`Clone`]: ../../std/clone/trait.Clone.html
14841474
#[stable(feature = "vec_resize_with", since = "1.33.0")]
14851475
pub fn resize_with<F>(&mut self, new_len: usize, f: F)
14861476
where
@@ -1590,8 +1580,6 @@ impl<T: Clone> Vec<T> {
15901580
/// assert_eq!(vec, [1, 2]);
15911581
/// ```
15921582
///
1593-
/// [`Clone`]: ../../std/clone/trait.Clone.html
1594-
/// [`Default`]: ../../std/default/trait.Default.html
15951583
/// [`resize_with`]: #method.resize_with
15961584
#[stable(feature = "vec_resize", since = "1.5.0")]
15971585
pub fn resize(&mut self, new_len: usize, value: T) {
@@ -1655,9 +1643,7 @@ impl<T: Default> Vec<T> {
16551643
/// ```
16561644
///
16571645
/// [`resize`]: #method.resize
1658-
/// [`Default::default()`]: ../../std/default/trait.Default.html#tymethod.default
1659-
/// [`Default`]: ../../std/default/trait.Default.html
1660-
/// [`Clone`]: ../../std/clone/trait.Clone.html
1646+
/// [`Default::default()`]: Default::default
16611647
#[unstable(feature = "vec_resize_default", issue = "41758")]
16621648
#[rustc_deprecated(
16631649
reason = "This is moving towards being removed in favor \
@@ -2338,7 +2324,6 @@ impl<T> Vec<T> {
23382324
/// Note that `drain_filter` also lets you mutate every element in the filter closure,
23392325
/// regardless of whether you choose to keep or remove it.
23402326
///
2341-
///
23422327
/// # Examples
23432328
///
23442329
/// Splitting an array into evens and odds, reusing the original allocation:

0 commit comments

Comments
 (0)