From 2add6ac14a29d5d828f4da01ee0a09db0f472975 Mon Sep 17 00:00:00 2001 From: Jimmy Cuadra Date: Thu, 2 Feb 2017 17:40:44 -0800 Subject: [PATCH] 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 --- src/libcore/convert.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/convert.rs b/src/libcore/convert.rs index abd686b15e22b..4e170794c1d6e 100644 --- a/src/libcore/convert.rs +++ b/src/libcore/convert.rs @@ -225,7 +225,7 @@ pub trait TryFrom: Sized { type Err; /// Performs the conversion. - fn try_from(T) -> Result; + fn try_from(value: T) -> Result; } ////////////////////////////////////////////////////////////////////////////////