@@ -202,9 +202,9 @@ pub trait AsMut<T: ?Sized> {
202
202
/// A value-to-value conversion that consumes the input value. The
203
203
/// opposite of [`From`].
204
204
///
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
208
208
/// the blanket implementation in the standard library. [`From`] cannot do these type of
209
209
/// conversions because of Rust's orphaning rules.
210
210
///
@@ -213,9 +213,9 @@ pub trait AsMut<T: ?Sized> {
213
213
/// # Generic Implementations
214
214
///
215
215
/// - [`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
217
217
///
218
- /// # Implementing `Into` for conversions to external types
218
+ /// # Implementing [ `Into`] for conversions to external types
219
219
///
220
220
/// If the destination type is not part of the current crate
221
221
/// then you can't implement [`From`] directly.
@@ -231,7 +231,7 @@ pub trait AsMut<T: ?Sized> {
231
231
/// ```
232
232
/// This will fail to compile because we cannot implement a trait for a type
233
233
/// 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:
235
235
///
236
236
/// ```
237
237
/// struct Wrapper<T>(Vec<T>);
@@ -242,19 +242,19 @@ pub trait AsMut<T: ?Sized> {
242
242
/// }
243
243
/// ```
244
244
///
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.
248
248
///
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.
251
251
///
252
252
/// # Examples
253
253
///
254
254
/// [`String`] implements `Into<Vec<u8>>`:
255
255
///
256
256
/// 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>`.
258
258
/// For example: The function `is_hello` takes all arguments that can be converted into a
259
259
/// `Vec<u8>`.
260
260
///
@@ -273,7 +273,7 @@ pub trait AsMut<T: ?Sized> {
273
273
/// [`Result<T, E>`]: ../../std/result/enum.Result.html
274
274
/// [`String`]: ../../std/string/struct.String.html
275
275
/// [`From`]: trait.From.html
276
- /// [`into `]: trait.Into.html#tymethod.into
276
+ /// [`Into `]: trait.Into.html
277
277
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
278
278
pub trait Into < T > : Sized {
279
279
/// Performs the conversion.
0 commit comments