Fix feature gating on rustc_index to not use implicit features
This commit is contained in:
parent
247ad3385c
commit
324d2e51ee
@ -1,4 +1,4 @@
|
||||
#[cfg(feature = "rustc_serialize")]
|
||||
#[cfg(feature = "nightly")]
|
||||
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
|
||||
|
||||
use std::borrow::{Borrow, BorrowMut};
|
||||
@ -322,14 +322,14 @@ fn default() -> Self {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "rustc_serialize")]
|
||||
#[cfg(feature = "nightly")]
|
||||
impl<S: Encoder, I: Idx, T: Encodable<S>> Encodable<S> for IndexVec<I, T> {
|
||||
fn encode(&self, s: &mut S) {
|
||||
Encodable::encode(&self.raw, s);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "rustc_serialize")]
|
||||
#[cfg(feature = "nightly")]
|
||||
impl<D: Decoder, I: Idx, T: Decodable<D>> Decodable<D> for IndexVec<I, T> {
|
||||
fn decode(d: &mut D) -> Self {
|
||||
IndexVec::from_raw(Vec::<T>::decode(d))
|
||||
|
Loading…
Reference in New Issue
Block a user