Add a name for the parameter to TryFrom::try_from
. · rust-lang/rust@2add6ac (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 2add6ac
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)
File tree
1 file changed
lines changed
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -225,7 +225,7 @@ pub trait TryFrom: Sized { | ||
225 | 225 | type Err; |
226 | 226 | |
227 | 227 | /// Performs the conversion. |
228 | - fn try_from(T) -> Result<Self, Self::Err>; | |
228 | + fn try_from(value: T) -> Result<Self, Self::Err>; | |
229 | 229 | } |
230 | 230 | |
231 | 231 | //////////////////////////////////////////////////////////////////////////////// |