File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -597,6 +597,9 @@ pub trait From<T>: Sized {
597597/// standard library. For more information on this, see the
598598/// documentation for [`Into`].
599599///
600+ /// Prefer using [`TryInto`] over [`TryFrom`] when specifying trait bounds on a generic function
601+ /// to ensure that types that only implement [`TryInto`] can be used as well.
602+ ///
600603/// # Implementing `TryInto`
601604///
602605/// This suffers the same restrictions and reasoning as implementing
@@ -636,6 +639,9 @@ pub trait TryInto<T>: Sized {
636639/// When the [`!`] type is stabilized [`Infallible`] and [`!`] will be
637640/// equivalent.
638641///
642+ /// Prefer using [`TryInto`] over [`TryFrom`] when specifying trait bounds on a generic function
643+ /// to ensure that types that only implement [`TryInto`] can be used as well.
644+ ///
639645/// `TryFrom<T>` can be implemented as follows:
640646///
641647/// ```
You can’t perform that action at this time.
0 commit comments