@@ -202,9 +202,9 @@ pub trait AsMut<T: ?Sized> {
202202/// A value-to-value conversion that consumes the input value. The
203203/// opposite of [`From`].
204204///
205- /// One should only implement `Into` if a conversion to a type outside the current crate is
206- /// required. Otherwise one should always prefer implementing [`From`] over `Into` because
207- /// implementing [`From`] automatically provides one with a implementation of `Into` thanks to
205+ /// One should only implement [ `Into`] if a conversion to a type outside the current crate is
206+ /// required. Otherwise one should always prefer implementing [`From`] over [ `Into`] because
207+ /// implementing [`From`] automatically provides one with a implementation of [ `Into`] thanks to
208208/// the blanket implementation in the standard library. [`From`] cannot do these type of
209209/// conversions because of Rust's orphaning rules.
210210///
@@ -213,9 +213,9 @@ pub trait AsMut<T: ?Sized> {
213213/// # Generic Implementations
214214///
215215/// - [`From`]`<T> for U` implies `Into<U> for T`
216- /// - `Into` is reflexive, which means that `Into<T> for T` is implemented
216+ /// - [ `Into`] is reflexive, which means that `Into<T> for T` is implemented
217217///
218- /// # Implementing `Into` for conversions to external types
218+ /// # Implementing [ `Into`] for conversions to external types
219219///
220220/// If the destination type is not part of the current crate
221221/// then you can't implement [`From`] directly.
@@ -231,7 +231,7 @@ pub trait AsMut<T: ?Sized> {
231231/// ```
232232/// This will fail to compile because we cannot implement a trait for a type
233233/// if both the trait and the type are not defined by the current crate.
234- /// This is due to Rust's orphaning rules. To bypass this, you can implement `Into` directly:
234+ /// This is due to Rust's orphaning rules. To bypass this, you can implement [ `Into`] directly:
235235///
236236/// ```
237237/// struct Wrapper<T>(Vec<T>);
@@ -242,19 +242,19 @@ pub trait AsMut<T: ?Sized> {
242242/// }
243243/// ```
244244///
245- /// It is important to understand that `Into` does not provide a [`From`] implementation
246- /// (as [`From`] does with `Into`). Therefore, you should always try to implement [`From`]
247- /// and then fall back to `Into` if [`From`] can't be implemented.
245+ /// It is important to understand that [ `Into`] does not provide a [`From`] implementation
246+ /// (as [`From`] does with [ `Into`] ). Therefore, you should always try to implement [`From`]
247+ /// and then fall back to [ `Into`] if [`From`] can't be implemented.
248248///
249- /// Prefer using `Into` over [`From`] when specifying trait bounds on a generic function
250- /// to ensure that types that only implement `Into` can be used as well.
249+ /// Prefer using [ `Into`] over [`From`] when specifying trait bounds on a generic function
250+ /// to ensure that types that only implement [ `Into`] can be used as well.
251251///
252252/// # Examples
253253///
254254/// [`String`] implements `Into<Vec<u8>>`:
255255///
256256/// In order to express that we want a generic function to take all arguments that can be
257- /// converted to a specified type `T`, we can use a trait bound of `Into<T>`.
257+ /// converted to a specified type `T`, we can use a trait bound of [ `Into`]` <T>`.
258258/// For example: The function `is_hello` takes all arguments that can be converted into a
259259/// `Vec<u8>`.
260260///
@@ -273,7 +273,7 @@ pub trait AsMut<T: ?Sized> {
273273/// [`Result<T, E>`]: ../../std/result/enum.Result.html
274274/// [`String`]: ../../std/string/struct.String.html
275275/// [`From`]: trait.From.html
276- /// [`into `]: trait.Into.html#tymethod.into
276+ /// [`Into `]: trait.Into.html
277277#[ stable( feature = "rust1" , since = "1.0.0" ) ]
278278pub trait Into < T > : Sized {
279279 /// Performs the conversion.
0 commit comments