Rollup merge of #39477 - jimmycuadra:try-from-parameter-name, r=alexcrichton

Add a name for the parameter to `TryFrom::try_from`.

Although signatures with anonymous parameters may not be deprecated or removed at this point, the team seems to agree that the ability to have an anonymous parameter is unfortunate historical baggage, and that we shouldn't create new code that uses it.

Context: https://github.com/rust-lang/rust/issues/33417#issuecomment-276933861
This commit is contained in:
Corey Farwell 2017-02-05 09:14:53 -05:00 committed by GitHub
commit e06fa7cf07

View File

@ -225,7 +225,7 @@ pub trait TryFrom<T>: Sized {
type Err;
/// Performs the conversion.
fn try_from(T) -> Result<Self, Self::Err>;
fn try_from(value: T) -> Result<Self, Self::Err>;
}
////////////////////////////////////////////////////////////////////////////////