diff --git a/compiler/rustc_serialize/src/serialize.rs b/compiler/rustc_serialize/src/serialize.rs index 2d37f5bdab8..bae5f259fcc 100644 --- a/compiler/rustc_serialize/src/serialize.rs +++ b/compiler/rustc_serialize/src/serialize.rs @@ -325,7 +325,7 @@ fn encode(&self, s: &mut S) { } } -impl<'a, S: Encoder, T: Encodable> Encodable for Cow<'a, [T]> +impl> Encodable for Cow<'_, [T]> where [T]: ToOwned>, { @@ -345,14 +345,14 @@ fn decode(d: &mut D) -> Cow<'static, [T]> { } } -impl<'a, S: Encoder> Encodable for Cow<'a, str> { +impl Encodable for Cow<'_, str> { fn encode(&self, s: &mut S) { let val: &str = self; val.encode(s) } } -impl<'a, D: Decoder> Decodable for Cow<'a, str> { +impl Decodable for Cow<'_, str> { fn decode(d: &mut D) -> Cow<'static, str> { let v: String = Decodable::decode(d); Cow::Owned(v)