use rustc::middle::exported_symbols::{ExportedSymbol, SymbolExportLevel};
use rustc::hir::def::{self, Def, CtorKind};
use rustc::hir::def_id::{CrateNum, DefId, DefIndex,
- CRATE_DEF_INDEX, LOCAL_CRATE};
+ CRATE_DEF_INDEX, LOCAL_CRATE, LocalDefId};
use rustc::ich::Fingerprint;
use rustc::middle::lang_items;
use rustc::mir::{self, interpret};
}
}
+impl<'a, 'tcx> SpecializedDecoder<LocalDefId> for DecodeContext<'a, 'tcx> {
+ #[inline]
+ fn specialized_decode(&mut self) -> Result<LocalDefId, Self::Error> {
+ self.specialized_decode().map(|i| LocalDefId::from_def_id(i))
+ }
+}
+
impl<'a, 'tcx> SpecializedDecoder<interpret::AllocId> for DecodeContext<'a, 'tcx> {
fn specialized_decode(&mut self) -> Result<interpret::AllocId, Self::Error> {
const MAX1: usize = usize::max_value() - 1;