Skip to content

Commit f29f212

Browse files
authored
Rollup merge of #75672 - kofls:intradoc-fix, r=jyn514
Move to intra-doc links for task.rs and vec.rs Partial fix for #75080 links for [`get`], [`get_mut`] skipped due to #75643 link for [`copy_from_slice`] skipped due to #63351
2 parents 5fff382 + 632db79 commit f29f212

File tree

2 files changed

+30
-48
lines changed

2 files changed

+30
-48
lines changed

Diff for: library/alloc/src/task.rs

+1-3
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.

Diff for: library/alloc/src/vec.rs

+29-45
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> {
@@ -375,7 +368,7 @@ impl<T> Vec<T> {
375368
/// into a `Vec` with the [`from_raw_parts`] function, allowing
376369
/// the destructor to perform the cleanup.
377370
///
378-
/// [`from_raw_parts`]: #method.from_raw_parts
371+
/// [`from_raw_parts`]: Vec::from_raw_parts
379372
///
380373
/// # Examples
381374
///
@@ -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
///
@@ -661,7 +654,7 @@ impl<T> Vec<T> {
661654
///
662655
/// Note that this will drop any excess capacity.
663656
///
664-
/// [owned slice]: ../../std/boxed/struct.Box.html
657+
/// [owned slice]: Box
665658
///
666659
/// # Examples
667660
///
@@ -732,8 +725,8 @@ impl<T> Vec<T> {
732725
/// assert_eq!(vec, []);
733726
/// ```
734727
///
735-
/// [`clear`]: #method.clear
736-
/// [`drain`]: #method.drain
728+
/// [`clear`]: Vec::clear
729+
/// [`drain`]: Vec::drain
737730
#[stable(feature = "rust1", since = "1.0.0")]
738731
pub fn truncate(&mut self, len: usize) {
739732
// This is safe because:
@@ -812,7 +805,7 @@ impl<T> Vec<T> {
812805
/// }
813806
/// ```
814807
///
815-
/// [`as_mut_ptr`]: #method.as_mut_ptr
808+
/// [`as_mut_ptr`]: Vec::as_mut_ptr
816809
#[stable(feature = "vec_as_ptr", since = "1.37.0")]
817810
#[inline]
818811
pub fn as_ptr(&self) -> *const T {
@@ -868,17 +861,17 @@ impl<T> Vec<T> {
868861
/// is done using one of the safe operations instead, such as
869862
/// [`truncate`], [`resize`], [`extend`], or [`clear`].
870863
///
871-
/// [`truncate`]: #method.truncate
872-
/// [`resize`]: #method.resize
873-
/// [`extend`]: ../../std/iter/trait.Extend.html#tymethod.extend
874-
/// [`clear`]: #method.clear
864+
/// [`truncate`]: Vec::truncate
865+
/// [`resize`]: Vec::resize
866+
/// [`extend`]: Extend::extend
867+
/// [`clear`]: Vec::clear
875868
///
876869
/// # Safety
877870
///
878871
/// - `new_len` must be less than or equal to [`capacity()`].
879872
/// - The elements at `old_len..new_len` must be initialized.
880873
///
881-
/// [`capacity()`]: #method.capacity
874+
/// [`capacity()`]: Vec::capacity
882875
///
883876
/// # Examples
884877
///
@@ -1217,8 +1210,6 @@ impl<T> Vec<T> {
12171210
/// Removes the last element from a vector and returns it, or [`None`] if it
12181211
/// is empty.
12191212
///
1220-
/// [`None`]: ../../std/option/enum.Option.html#variant.None
1221-
///
12221213
/// # Examples
12231214
///
12241215
/// ```
@@ -1482,8 +1473,7 @@ impl<T> Vec<T> {
14821473
/// assert_eq!(vec, [2, 4, 8, 16]);
14831474
/// ```
14841475
///
1485-
/// [`resize`]: #method.resize
1486-
/// [`Clone`]: ../../std/clone/trait.Clone.html
1476+
/// [`resize`]: Vec::resize
14871477
#[stable(feature = "vec_resize_with", since = "1.33.0")]
14881478
pub fn resize_with<F>(&mut self, new_len: usize, f: F)
14891479
where
@@ -1534,7 +1524,7 @@ impl<T> Vec<T> {
15341524
/// reading from a file) before marking the data as initialized using the
15351525
/// [`set_len`] method.
15361526
///
1537-
/// [`set_len`]: #method.set_len
1527+
/// [`set_len`]: Vec::set_len
15381528
///
15391529
/// # Examples
15401530
///
@@ -1593,9 +1583,7 @@ impl<T: Clone> Vec<T> {
15931583
/// assert_eq!(vec, [1, 2]);
15941584
/// ```
15951585
///
1596-
/// [`Clone`]: ../../std/clone/trait.Clone.html
1597-
/// [`Default`]: ../../std/default/trait.Default.html
1598-
/// [`resize_with`]: #method.resize_with
1586+
/// [`resize_with`]: Vec::resize_with
15991587
#[stable(feature = "vec_resize", since = "1.5.0")]
16001588
pub fn resize(&mut self, new_len: usize, value: T) {
16011589
let len = self.len();
@@ -1657,10 +1645,7 @@ impl<T: Default> Vec<T> {
16571645
/// assert_eq!(vec, [1, 2]);
16581646
/// ```
16591647
///
1660-
/// [`resize`]: #method.resize
1661-
/// [`Default::default()`]: ../../std/default/trait.Default.html#tymethod.default
1662-
/// [`Default`]: ../../std/default/trait.Default.html
1663-
/// [`Clone`]: ../../std/clone/trait.Clone.html
1648+
/// [`resize`]: Vec::resize
16641649
#[unstable(feature = "vec_resize_default", issue = "41758")]
16651650
#[rustc_deprecated(
16661651
reason = "This is moving towards being removed in favor \
@@ -2341,7 +2326,6 @@ impl<T> Vec<T> {
23412326
/// Note that `drain_filter` also lets you mutate every element in the filter closure,
23422327
/// regardless of whether you choose to keep or remove it.
23432328
///
2344-
///
23452329
/// # Examples
23462330
///
23472331
/// Splitting an array into evens and odds, reusing the original allocation:

0 commit comments

Comments
 (0)