We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
From
Into
1 parent 2cf7028 commit 98e2c0bCopy full SHA for 98e2c0b
core/src/convert/mod.rs
@@ -464,8 +464,8 @@ pub trait Into<T>: Sized {
464
/// orphaning rules.
465
/// See [`Into`] for more details.
466
///
467
-/// Prefer using [`Into`] over using `From` when specifying trait bounds on a generic function.
468
-/// This way, types that directly implement [`Into`] can be used as arguments as well.
+/// Prefer using [`Into`] over [`From`] when specifying trait bounds on a generic function
+/// to ensure that types that only implement [`Into`] can be used as well.
469
470
/// The `From` trait is also very useful when performing error handling. When constructing a function
471
/// that is capable of failing, the return type will generally be of the form `Result<T, E>`.
0 commit comments