diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-02-05 09:14:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-05 09:14:53 -0500 |
| commit | e06fa7cf07a4b6f7727dbb4f82f97f0ee0450f80 (patch) | |
| tree | 221d64068b6fcc06e4760a09b6ae6d0c0d68fe0f /src/libcore | |
| parent | e7f6c36a78e9f69568babbf6a0ae895caa818a8e (diff) | |
| parent | 2add6ac14a29d5d828f4da01ee0a09db0f472975 (diff) | |
| download | rust-e06fa7cf07a4b6f7727dbb4f82f97f0ee0450f80.tar.gz rust-e06fa7cf07a4b6f7727dbb4f82f97f0ee0450f80.zip | |
Rollup merge of #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: https://github.com/rust-lang/rust/issues/33417#issuecomment-276933861
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/convert.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/convert.rs b/src/libcore/convert.rs index abd686b15e2..4e170794c1d 100644 --- a/src/libcore/convert.rs +++ b/src/libcore/convert.rs @@ -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>; } //////////////////////////////////////////////////////////////////////////////// |
