Skip to content

Commit 85d8879

Browse files
committed
Impl UseSpecializedDecodable for &T
1 parent 5833c19 commit 85d8879

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

src/librustc/arena.rs

-9
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,9 @@ macro_rules! declare_arena {
2424
}
2525
}
2626

27-
macro_rules! impl_specialized_decodable {
28-
([decode] $ty:ty, $tcx:lifetime) => {
29-
impl<$tcx> serialize::UseSpecializedDecodable for &$tcx $ty {}
30-
};
31-
([] $ty:ty, $tcx:lifetime) => {};
32-
}
33-
3427
macro_rules! impl_arena_allocatable {
3528
([], [$($a:tt $name:ident: $ty:ty,)*], $tcx:lifetime) => {
3629
$(
37-
impl_specialized_decodable!($a $ty, $tcx);
38-
3930
impl ArenaAllocatable for $ty {}
4031
impl<$tcx> ArenaField<$tcx> for $ty {
4132
#[inline]

src/libserialize/serialize.rs

+1
Original file line numberDiff line numberDiff line change
@@ -911,4 +911,5 @@ impl<T: UseSpecializedDecodable> Decodable for T {
911911
impl<'a, T: ?Sized + Encodable> UseSpecializedEncodable for &'a T {}
912912
impl<T: ?Sized + Encodable> UseSpecializedEncodable for Box<T> {}
913913
impl<T: Decodable> UseSpecializedDecodable for Box<T> {}
914+
impl<'a, T: ?Sized + Decodable> UseSpecializedDecodable for &'a T {}
914915
impl<'a, T: ?Sized + Decodable> UseSpecializedDecodable for &'a [T] {}

0 commit comments

Comments
 (0)