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 7e552b4 commit b6c2a42Copy full SHA for b6c2a42
library/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