Skip to content

Commit e06fa7c

Browse files
authoredFeb 5, 2017
Rollup merge of rust-lang#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: rust-lang#33417 (comment)
2 parents e7f6c36 + 2add6ac commit e06fa7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/libcore/convert.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ pub trait TryFrom<T>: Sized {
225225
type Err;
226226

227227
/// Performs the conversion.
228-
fn try_from(T) -> Result<Self, Self::Err>;
228+
fn try_from(value: T) -> Result<Self, Self::Err>;
229229
}
230230

231231
////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)