mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-16 17:03:35 +00:00
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:
commit
e06fa7cf07
@ -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>;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user