From 90aa8fb3d51093ac3d9ea5dbdf3cccfa236ff05a Mon Sep 17 00:00:00 2001 From: Anuvrat Date: Tue, 14 Dec 2021 16:42:16 +0530 Subject: [PATCH] made compiler happy --- library/proc_macro/src/bridge/client.rs | 4 ++-- library/proc_macro/src/bridge/mod.rs | 8 ++++---- library/proc_macro/src/bridge/rpc.rs | 8 ++++---- library/proc_macro/src/lib.rs | 1 - 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/library/proc_macro/src/bridge/client.rs b/library/proc_macro/src/bridge/client.rs index 8ae7b6de1a63e..83a2ac6f0d4f1 100644 --- a/library/proc_macro/src/bridge/client.rs +++ b/library/proc_macro/src/bridge/client.rs @@ -78,7 +78,7 @@ macro_rules! define_handles { } } - impl Decode<'_, 's, HandleStore>> + impl<'s, S: server::Types> Decode<'_, 's, HandleStore>> for &'s Marked { fn decode(r: &mut Reader<'_>, s: &'s HandleStore>) -> Self { @@ -92,7 +92,7 @@ macro_rules! define_handles { } } - impl DecodeMut<'_, 's, HandleStore>> + impl<'s, S: server::Types> DecodeMut<'_, 's, HandleStore>> for &'s mut Marked { fn decode( diff --git a/library/proc_macro/src/bridge/mod.rs b/library/proc_macro/src/bridge/mod.rs index 2df287f7d9300..fbeb585095bbb 100644 --- a/library/proc_macro/src/bridge/mod.rs +++ b/library/proc_macro/src/bridge/mod.rs @@ -295,13 +295,13 @@ impl Unmark for Marked { self.value } } -impl Unmark for &'a Marked { +impl<'a, T, M> Unmark for &'a Marked { type Unmarked = &'a T; fn unmark(self) -> Self::Unmarked { &self.value } } -impl Unmark for &'a mut Marked { +impl<'a, T, M> Unmark for &'a mut Marked { type Unmarked = &'a mut T; fn unmark(self) -> Self::Unmarked { &mut self.value @@ -356,8 +356,8 @@ mark_noop! { (), bool, char, - &'a [u8], - &'a str, + &'_ [u8], + &'_ str, String, usize, Delimiter, diff --git a/library/proc_macro/src/bridge/rpc.rs b/library/proc_macro/src/bridge/rpc.rs index 42432563faf33..d50564d01a5d2 100644 --- a/library/proc_macro/src/bridge/rpc.rs +++ b/library/proc_macro/src/bridge/rpc.rs @@ -79,7 +79,7 @@ macro_rules! rpc_encode_decode { } } - impl DecodeMut<'a, 's, S>),+)?> DecodeMut<'a, '_, S> + impl<'a, S, $($($T: for<'s> DecodeMut<'a, 's, S>),+)?> DecodeMut<'a, '_, S> for $name $(<$($T),+>)? { fn decode(r: &mut Reader<'a>, s: &mut S) -> Self { @@ -176,7 +176,7 @@ impl, B: Encode> Encode for (A, B) { } } -impl DecodeMut<'a, 's, S>, B: for<'s> DecodeMut<'a, 's, S>> DecodeMut<'a, '_, S> +impl<'a, S, A: for<'s> DecodeMut<'a, 's, S>, B: for<'s> DecodeMut<'a, 's, S>> DecodeMut<'a, '_, S> for (A, B) { fn decode(r: &mut Reader<'a>, s: &mut S) -> Self { @@ -213,7 +213,7 @@ impl Encode for &[u8] { } } -impl DecodeMut<'a, '_, S> for &'a [u8] { +impl<'a, S> DecodeMut<'a, '_, S> for &'a [u8] { fn decode(r: &mut Reader<'a>, s: &mut S) -> Self { let len = usize::decode(r, s); let xs = &r[..len]; @@ -228,7 +228,7 @@ impl Encode for &str { } } -impl DecodeMut<'a, '_, S> for &'a str { +impl<'a, S> DecodeMut<'a, '_, S> for &'a str { fn decode(r: &mut Reader<'a>, s: &mut S) -> Self { str::from_utf8(<&[u8]>::decode(r, s)).unwrap() } diff --git a/library/proc_macro/src/lib.rs b/library/proc_macro/src/lib.rs index ef96d72a38b54..69af598f91e1c 100644 --- a/library/proc_macro/src/lib.rs +++ b/library/proc_macro/src/lib.rs @@ -25,7 +25,6 @@ #![feature(allow_internal_unstable)] #![feature(decl_macro)] #![feature(extern_types)] -#![feature(in_band_lifetimes)] #![feature(negative_impls)] #![feature(auto_traits)] #![feature(restricted_std)]