@@ -134,8 +134,8 @@ pub const fn identity<T>(x: T) -> T {
134134/// want to accept all references that can be converted to [`&str`] as an argument.
135135/// Since both [`String`] and [`&str`] implement `AsRef<str>` we can accept both as input argument.
136136///
137- /// [`Option<T>`]: crate::option:: Option
138- /// [`Result<T, E>`]: crate::result:: Result
137+ /// [`Option<T>`]: Option
138+ /// [`Result<T, E>`]: Result
139139/// [`Borrow`]: crate::borrow::Borrow
140140/// [`Eq`]: crate::cmp::Eq
141141/// [`Ord`]: crate::cmp::Ord
@@ -168,8 +168,8 @@ pub trait AsRef<T: ?Sized> {
168168/// **Note: This trait must not fail**. If the conversion can fail, use a
169169/// dedicated method which returns an [`Option<T>`] or a [`Result<T, E>`].
170170///
171- /// [`Option<T>`]: crate::option:: Option
172- /// [`Result<T, E>`]: crate::result:: Result
171+ /// [`Option<T>`]: Option
172+ /// [`Result<T, E>`]: Result
173173///
174174/// # Generic Implementations
175175///
@@ -195,7 +195,7 @@ pub trait AsRef<T: ?Sized> {
195195/// assert_eq!(*boxed_num, 1);
196196/// ```
197197///
198- /// [`Box<T>`]: crate:: boxed:: Box<T>
198+ /// [`Box<T>`]: ../../std/ boxed/struct. Box.html
199199#[ stable( feature = "rust1" , since = "1.0.0" ) ]
200200pub trait AsMut < T : ?Sized > {
201201 /// Performs the conversion.
@@ -269,10 +269,10 @@ pub trait AsMut<T: ?Sized> {
269269/// is_hello(s);
270270/// ```
271271///
272- /// [`Option<T>`]: crate::option:: Option
273- /// [`Result<T, E>`]: crate::result:: Result
272+ /// [`Option<T>`]: Option
273+ /// [`Result<T, E>`]: Result
274274/// [`String`]: ../../std/string/struct.String.html
275- /// [`Vec`]: crate:: vec:: Vec<T>
275+ /// [`Vec`]: ../../std/ vec/struct. Vec.html
276276#[ stable( feature = "rust1" , since = "1.0.0" ) ]
277277pub trait Into < T > : Sized {
278278 /// Performs the conversion.
@@ -358,9 +358,10 @@ pub trait Into<T>: Sized {
358358/// }
359359/// ```
360360///
361- /// [`Option<T>`]: crate::option:: Option
362- /// [`Result<T, E>`]: crate::result:: Result
361+ /// [`Option<T>`]: Option
362+ /// [`Result<T, E>`]: Result
363363/// [`String`]: ../../std/string/struct.String.html
364+ /// [`from`]: From::from
364365/// [book]: ../../book/ch09-00-error-handling.html
365366#[ rustc_diagnostic_item = "from_trait" ]
366367#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -418,7 +419,7 @@ pub trait TryInto<T>: Sized {
418419/// # Generic Implementations
419420///
420421/// - `TryFrom<T> for U` implies [`TryInto`]`<U> for T`
421- /// - [`TryFrom:: try_from`] is reflexive, which means that `TryFrom<T> for T`
422+ /// - [`try_from`] is reflexive, which means that `TryFrom<T> for T`
422423/// is implemented and cannot fail -- the associated `Error` type for
423424/// calling `T::try_from()` on a value of type `T` is [`Infallible`].
424425/// When the [`!`] type is stabilized [`Infallible`] and [`!`] will be
@@ -467,7 +468,7 @@ pub trait TryInto<T>: Sized {
467468/// assert!(try_successful_smaller_number.is_ok());
468469/// ```
469470///
470- /// [`i32::MAX `]: crate::i32::MAX
471+ /// [`try_from `]: TryFrom::try_from
471472/// [`!`]: ../../std/primitive.never.html
472473#[ stable( feature = "try_from" , since = "1.34.0" ) ]
473474pub trait TryFrom < T > : Sized {
@@ -670,8 +671,6 @@ impl AsRef<str> for str {
670671/// the two `impl`s will start to overlap
671672/// and therefore will be disallowed by the language’s trait coherence rules.
672673///
673- /// [`Ok`]: super::result::Result::Ok
674- /// [`Result`]: super::result::Result
675674/// [never]: ../../std/primitive.never.html
676675#[ stable( feature = "convert_infallible" , since = "1.34.0" ) ]
677676#[ derive( Copy ) ]
0 commit comments