Skip to content

Commit

Permalink
Add a name for the parameter to TryFrom::try_from.
Browse files Browse the repository at this point in the history
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: #33417 (comment)
  • Loading branch information
jimmycuadra committed Feb 3, 2017
1 parent eedaa94 commit 2add6ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
}

////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 2add6ac

Please sign in to comment.