Rollup merge of #92541 - asquared31415:from-docs, r=m-ou-se
Mention intent of `From` trait in its docs This pr is a docs modification to add to the documentation of the `From` trait a note about its intent as a perfect conversion. This is already stated in the `TryFrom` docs so this is simply adding that information in a more visible way.
This commit is contained in:
commit
2567d0f883
1 changed files with 2 additions and 1 deletions
|
@ -300,7 +300,8 @@ pub trait Into<T>: Sized {
|
|||
/// that encapsulate multiple error types. See the "Examples" section and [the book][book] for more
|
||||
/// details.
|
||||
///
|
||||
/// **Note: This trait must not fail**. If the conversion can fail, use [`TryFrom`].
|
||||
/// **Note: This trait must not fail**. The `From` trait is intended for perfect conversions.
|
||||
/// If the conversion can fail or is not perfect, use [`TryFrom`].
|
||||
///
|
||||
/// # Generic Implementations
|
||||
///
|
||||
|
|
Loading…
Add table
Reference in a new issue