}
#[inline]
-pub fn decode_arena_allocable<'a, 'tcx, D, T: ArenaAllocatable<'tcx> + Decodable>(
+pub fn decode_arena_allocable<'a, 'tcx, D, T: ArenaAllocatable + Decodable>(
decoder: &mut D
) -> Result<&'tcx T, D::Error>
where D: TyDecoder<'a, 'tcx>,
}
#[inline]
-pub fn decode_arena_allocable_slice<'a, 'tcx, D, T: ArenaAllocatable<'tcx> + Decodable>(
+pub fn decode_arena_allocable_slice<'a, 'tcx, D, T: ArenaAllocatable + Decodable>(
decoder: &mut D
) -> Result<&'tcx [T], D::Error>
where D: TyDecoder<'a, 'tcx>,
#[macro_export]
macro_rules! impl_arena_allocatable_decoder {
- ([$DecoderName:ident [$($typaram:tt),*]], [[decode] $name:ident: $ty:ty], $tcx:lifetime) => {
+ ([]$args:tt) => {};
+ ([decode $(, $attrs:ident)*]
+ [[$DecoderName:ident [$($typaram:tt),*]], [$name:ident: $ty:ty], $tcx:lifetime]) => {
impl<$($typaram),*> SpecializedDecoder<&$tcx $ty> for $DecoderName<$($typaram),*> {
#[inline]
fn specialized_decode(&mut self) -> Result<&$tcx $ty, Self::Error> {
}
}
};
- ([$DecoderName:ident [$($typaram:tt),*]], [[] $name:ident: $ty:ty], $tcx:lifetime) => {};
+ ([$ignore:ident $(, $attrs:ident)*]$args:tt) => {
+ impl_arena_allocatable_decoder!([$($attrs),*]$args);
+ };
}
#[macro_export]
macro_rules! impl_arena_allocatable_decoders {
($args:tt, [$($a:tt $name:ident: $ty:ty,)*], $tcx:lifetime) => {
$(
- impl_arena_allocatable_decoder!($args, [$a $name: $ty], $tcx);
+ impl_arena_allocatable_decoder!($a [$args, [$name: $ty], $tcx]);
)*
}
}