From d290849a233bb2b06b01167c242b3886d2cf8681 Mon Sep 17 00:00:00 2001 From: est31 Date: Tue, 2 May 2017 05:55:20 +0200 Subject: Removal pass for anonymous parameters Removes occurences of anonymous parameters from the rustc codebase, as they are to be deprecated. See issue #41686 and RFC 1685. --- src/libcore/convert.rs | 2 +- src/libcore/hash/sip.rs | 4 ++-- src/libcore/ops.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libcore') diff --git a/src/libcore/convert.rs b/src/libcore/convert.rs index 084736685e3..f5dc38e8aab 100644 --- a/src/libcore/convert.rs +++ b/src/libcore/convert.rs @@ -276,7 +276,7 @@ pub trait Into: Sized { pub trait From: Sized { /// Performs the conversion. #[stable(feature = "rust1", since = "1.0.0")] - fn from(T) -> Self; + fn from(t: T) -> Self; } /// An attempted conversion that consumes `self`, which may or may not be diff --git a/src/libcore/hash/sip.rs b/src/libcore/hash/sip.rs index 5f5d07b6682..db12496b6f3 100644 --- a/src/libcore/hash/sip.rs +++ b/src/libcore/hash/sip.rs @@ -403,8 +403,8 @@ impl Default for Hasher { #[doc(hidden)] trait Sip { - fn c_rounds(&mut State); - fn d_rounds(&mut State); + fn c_rounds(_: &mut State); + fn d_rounds(_: &mut State); } #[derive(Debug, Clone, Default)] diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index 175b3a5a69a..391b606f613 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -2878,10 +2878,10 @@ pub trait Carrier { type Error; /// Create a `Carrier` from a success value. - fn from_success(Self::Success) -> Self; + fn from_success(_: Self::Success) -> Self; /// Create a `Carrier` from an error value. - fn from_error(Self::Error) -> Self; + fn from_error(_: Self::Error) -> Self; /// Translate this `Carrier` to another implementation of `Carrier` with the /// same associated types. -- cgit 1.4.1-3-g733a5 From 14bbd0a5a3722bdcb4c5f36d81097e1fb992add3 Mon Sep 17 00:00:00 2001 From: est31 Date: Tue, 2 May 2017 06:35:36 +0200 Subject: Address review --- src/libcore/convert.rs | 2 +- src/librustdoc/html/highlight.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libcore') diff --git a/src/libcore/convert.rs b/src/libcore/convert.rs index f5dc38e8aab..21c75ad3395 100644 --- a/src/libcore/convert.rs +++ b/src/libcore/convert.rs @@ -276,7 +276,7 @@ pub trait Into: Sized { pub trait From: Sized { /// Performs the conversion. #[stable(feature = "rust1", since = "1.0.0")] - fn from(t: T) -> Self; + fn from(_: T) -> Self; } /// An attempted conversion that consumes `self`, which may or may not be diff --git a/src/librustdoc/html/highlight.rs b/src/librustdoc/html/highlight.rs index c1f1cb43e41..a40d1e6bdc9 100644 --- a/src/librustdoc/html/highlight.rs +++ b/src/librustdoc/html/highlight.rs @@ -134,7 +134,7 @@ pub trait Writer { fn string(&mut self, text: T, klass: Class, - tas: Option<&TokenAndSpan>) + tok: Option<&TokenAndSpan>) -> io::Result<()>; } -- cgit 1.4.1-3-g733a5