mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
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 rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
|
||||||
|
|
||||||
use std::borrow::{Borrow, BorrowMut};
|
use std::borrow::{Borrow, BorrowMut};
|
||||||
@ -322,14 +322,14 @@ impl<I: Idx, T, const N: usize> From<[T; N]> for IndexVec<I, T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "rustc_serialize")]
|
#[cfg(feature = "nightly")]
|
||||||
impl<S: Encoder, I: Idx, T: Encodable<S>> Encodable<S> for IndexVec<I, T> {
|
impl<S: Encoder, I: Idx, T: Encodable<S>> Encodable<S> for IndexVec<I, T> {
|
||||||
fn encode(&self, s: &mut S) {
|
fn encode(&self, s: &mut S) {
|
||||||
Encodable::encode(&self.raw, 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> {
|
impl<D: Decoder, I: Idx, T: Decodable<D>> Decodable<D> for IndexVec<I, T> {
|
||||||
fn decode(d: &mut D) -> Self {
|
fn decode(d: &mut D) -> Self {
|
||||||
IndexVec::from_raw(Vec::<T>::decode(d))
|
IndexVec::from_raw(Vec::<T>::decode(d))
|
||||||
|
Loading…
Reference in New Issue
Block a user