Skip to content

Commit eba03d4

Browse files
committed
Fix convert module's documentation links
1 parent 3de0106 commit eba03d4

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/libcore/convert.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ pub trait AsMut<T: ?Sized> {
213213
///
214214
/// # Generic Implementations
215215
///
216-
/// - [`From<T>`]` for U` implies `Into<U> for T`
216+
/// - [`From`]`<T> for U` implies `Into<U> for T`
217217
/// - [`Into`]` is reflexive, which means that `Into<T> for T` is implemented
218218
///
219219
/// # Implementing `Into` for conversions to external types
@@ -273,7 +273,7 @@ pub trait AsMut<T: ?Sized> {
273273
/// [`Option<T>`]: ../../std/option/enum.Option.html
274274
/// [`Result<T, E>`]: ../../std/result/enum.Result.html
275275
/// [`String`]: ../../std/string/struct.String.html
276-
/// [From]: trait.From.html
276+
/// [`From`]: trait.From.html
277277
/// [`into`]: trait.Into.html#tymethod.into
278278
#[stable(feature = "rust1", since = "1.0.0")]
279279
pub trait Into<T>: Sized {
@@ -285,18 +285,18 @@ pub trait Into<T>: Sized {
285285
/// Used to do value-to-value conversions while consuming the input value. It is the reciprocal of
286286
/// [`Into`].
287287
///
288-
/// One should always prefer implementing [`From`] over [`Into`]
289-
/// because implementing [`From`] automatically provides one with a implementation of [`Into`]
288+
/// One should always prefer implementing `From` over [`Into`]
289+
/// because implementing `From` automatically provides one with a implementation of [`Into`]
290290
/// thanks to the blanket implementation in the standard library.
291291
///
292292
/// Only implement [`Into`] if a conversion to a type outside the current crate is required.
293-
/// [`From`] cannot do these type of conversions because of Rust's orphaning rules.
293+
/// `From` cannot do these type of conversions because of Rust's orphaning rules.
294294
/// See [`Into`] for more details.
295295
///
296-
/// Prefer using [`Into`] over using [`From`] when specifying trait bounds on a generic function.
296+
/// Prefer using [`Into`] over using `From` when specifying trait bounds on a generic function.
297297
/// This way, types that directly implement [`Into`] can be used as arguments as well.
298298
///
299-
/// The [`From`] is also very useful when performing error handling. When constructing a function
299+
/// The `From` is also very useful when performing error handling. When constructing a function
300300
/// that is capable of failing, the return type will generally be of the form `Result<T, E>`.
301301
/// The `From` trait simplifies error handling by allowing a function to return a single error type
302302
/// that encapsulate multiple error types. See the "Examples" section and [the book][book] for more
@@ -306,8 +306,8 @@ pub trait Into<T>: Sized {
306306
///
307307
/// # Generic Implementations
308308
///
309-
/// - [`From<T>`]` for U` implies [`Into<U>`]` for T`
310-
/// - [`From`] is reflexive, which means that `From<T> for T` is implemented
309+
/// - `From<T>` for U` implies [`Into`]`<U> for T`
310+
/// - `From` is reflexive, which means that `From<T> for T` is implemented
311311
///
312312
/// # Examples
313313
///
@@ -361,7 +361,7 @@ pub trait Into<T>: Sized {
361361
/// [`Option<T>`]: ../../std/option/enum.Option.html
362362
/// [`Result<T, E>`]: ../../std/result/enum.Result.html
363363
/// [`String`]: ../../std/string/struct.String.html
364-
/// [`Into<U>`]: trait.Into.html
364+
/// [`Into`]: trait.Into.html
365365
/// [`from`]: trait.From.html#tymethod.from
366366
/// [book]: ../../book/ch09-00-error-handling.html
367367
#[stable(feature = "rust1", since = "1.0.0")]
@@ -422,7 +422,7 @@ pub trait TryInto<T>: Sized {
422422
///
423423
/// # Generic Implementations
424424
///
425-
/// - `TryFrom<T> for U` implies [`TryInto<U>`]` for T`
425+
/// - `TryFrom<T> for U` implies [`TryInto`]`<U> for T`
426426
/// - [`try_from`] is reflexive, which means that `TryFrom<T> for T`
427427
/// is implemented and cannot fail -- the associated `Error` type for
428428
/// calling `T::try_from()` on a value of type `T` is `Infallible`.

0 commit comments

Comments
 (0)