Skip to content

Commit 2add6ac

Browse files
committed
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: #33417 (comment)
1 parent eedaa94 commit 2add6ac

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)