Skip to content
Permalink
Browse files

Impl UseSpecializedDecodable for &T

  • Loading branch information...
Zoxc committed Mar 30, 2019
1 parent e835d27 commit 4ccb9ae98afa892edaaf7dbfc624870fd5d28339
Showing with 1 addition and 9 deletions.
  1. +0 −9 src/librustc/arena.rs
  2. +1 −0 src/libserialize/serialize.rs
@@ -24,18 +24,9 @@ macro_rules! declare_arena {
}
}

macro_rules! impl_specialized_decodable {
([decode] $ty:ty, $tcx:lifetime) => {
impl<$tcx> serialize::UseSpecializedDecodable for &$tcx $ty {}
};
([] $ty:ty, $tcx:lifetime) => {};
}

macro_rules! impl_arena_allocatable {
([], [$($a:tt $name:ident: $ty:ty,)*], $tcx:lifetime) => {
$(
impl_specialized_decodable!($a $ty, $tcx);

impl ArenaAllocatable for $ty {}
impl<$tcx> ArenaField<$tcx> for $ty {
#[inline]
@@ -911,4 +911,5 @@ impl<T: UseSpecializedDecodable> Decodable for T {
impl<'a, T: ?Sized + Encodable> UseSpecializedEncodable for &'a T {}
impl<T: ?Sized + Encodable> UseSpecializedEncodable for Box<T> {}
impl<T: Decodable> UseSpecializedDecodable for Box<T> {}
impl<'a, T: ?Sized + Decodable> UseSpecializedDecodable for &'a T {}
impl<'a, T: ?Sized + Decodable> UseSpecializedDecodable for &'a [T] {}

0 comments on commit 4ccb9ae

Please sign in to comment.
You can’t perform that action at this time.