diff --git a/library/core/src/ops/drop.rs b/library/core/src/ops/drop.rs index 0824753db75..ce7d1c3d06d 100644 --- a/library/core/src/ops/drop.rs +++ b/library/core/src/ops/drop.rs @@ -80,7 +80,7 @@ /// /// If you'd like explicitly call the destructor of a value, [`mem::drop`] can be used instead. /// -/// [`mem::drop`]: crate::mem::drop +/// [`mem::drop`]: drop /// /// ## Drop order /// @@ -132,8 +132,6 @@ /// are `Copy` get implicitly duplicated by the compiler, making it very /// hard to predict when, and how often destructors will be executed. As such, /// these types cannot have destructors. -/// -/// [`Copy`]: crate::marker::Copy #[lang = "drop"] #[stable(feature = "rust1", since = "1.0.0")] pub trait Drop { @@ -160,7 +158,7 @@ pub trait Drop { /// /// [E0040]: ../../error-index.html#E0040 /// [`panic!`]: crate::panic! - /// [`mem::drop`]: crate::mem::drop + /// [`mem::drop`]: drop /// [`ptr::drop_in_place`]: crate::ptr::drop_in_place #[stable(feature = "rust1", since = "1.0.0")] fn drop(&mut self); diff --git a/library/core/src/ops/index.rs b/library/core/src/ops/index.rs index 9c2da00ae2f..3c2ada57612 100644 --- a/library/core/src/ops/index.rs +++ b/library/core/src/ops/index.rs @@ -4,7 +4,6 @@ /// but only when used as an immutable value. If a mutable value is requested, /// [`IndexMut`] is used instead. This allows nice things such as /// `let value = v[index]` if the type of `value` implements [`Copy`]. -/// [`Copy`]: crate::marker::Copy /// /// # Examples /// diff --git a/library/core/src/ops/mod.rs b/library/core/src/ops/mod.rs index ddcea46a552..c19bd6e441e 100644 --- a/library/core/src/ops/mod.rs +++ b/library/core/src/ops/mod.rs @@ -133,7 +133,7 @@ //! // `consume_and_return_x` can no longer be invoked at this point //! ``` //! -//! [`clone`]: crate::clone::Clone::clone +//! [`clone`]: Clone::clone //! [operator precedence]: ../../reference/expressions.html#expression-precedence #![stable(feature = "rust1", since = "1.0.0")] diff --git a/library/core/src/ops/range.rs b/library/core/src/ops/range.rs index 5614c30b43e..ccabd66aaf6 100644 --- a/library/core/src/ops/range.rs +++ b/library/core/src/ops/range.rs @@ -35,8 +35,6 @@ use crate::hash::Hash; /// assert_eq!(arr[1..=3], [ 1,2,3 ]); /// ``` /// -/// [`IntoIterator`]: crate::iter::IntoIterator -/// [`Iterator`]: crate::iter::Iterator /// [slicing index]: crate::slice::SliceIndex #[cfg_attr(not(bootstrap), lang = "RangeFull")] #[doc(alias = "..")] @@ -178,8 +176,6 @@ impl> Range { /// assert_eq!(arr[1.. 3], [ 1,2 ]); /// assert_eq!(arr[1..=3], [ 1,2,3 ]); /// ``` -/// -/// [`Iterator`]: crate::iter::IntoIterator #[cfg_attr(not(bootstrap), lang = "RangeFrom")] #[doc(alias = "..")] #[derive(Clone, PartialEq, Eq, Hash)] // not Copy -- see #27186 @@ -260,8 +256,6 @@ impl> RangeFrom { /// assert_eq!(arr[1..=3], [ 1,2,3 ]); /// ``` /// -/// [`IntoIterator`]: crate::iter::IntoIterator -/// [`Iterator`]: crate::iter::Iterator /// [slicing index]: crate::slice::SliceIndex #[cfg_attr(not(bootstrap), lang = "RangeTo")] #[doc(alias = "..")] @@ -558,8 +552,6 @@ impl> RangeInclusive { /// assert_eq!(arr[1..=3], [ 1,2,3 ]); /// ``` /// -/// [`IntoIterator`]: crate::iter::IntoIterator -/// [`Iterator`]: crate::iter::Iterator /// [slicing index]: crate::slice::SliceIndex #[cfg_attr(not(bootstrap), lang = "RangeToInclusive")] #[doc(alias = "..=")]