Remove unused SyntaxContext serialization impls

The implementations were wrong and unused.
This commit is contained in:
Matthew Jasper 2019-08-13 19:19:31 +01:00
parent d04af194fc
commit 1c0a5469ed
3 changed files with 0 additions and 20 deletions

View file

@ -356,14 +356,6 @@ impl SpecializedDecoder<Ident> for DecodeContext<'_, '_> {
}
}
impl SpecializedDecoder<SyntaxContext> for DecodeContext<'_, '_> {
fn specialized_decode(&mut self) -> Result<SyntaxContext, Self::Error> {
// FIXME(jseyfried): intercrate hygiene
Ok(SyntaxContext::empty())
}
}
impl<'a, 'tcx> SpecializedDecoder<Fingerprint> for DecodeContext<'a, 'tcx> {
fn specialized_decode(&mut self) -> Result<Fingerprint, Self::Error> {
Fingerprint::decode_opaque(&mut self.opaque)

View file

@ -33,7 +33,6 @@ use syntax::attr;
use syntax::source_map::Spanned;
use syntax::symbol::{kw, sym, Ident};
use syntax_pos::{self, FileName, SourceFile, Span};
use syntax_pos::hygiene::SyntaxContext;
use log::{debug, trace};
use rustc::hir::{self, PatKind};
@ -181,13 +180,6 @@ impl SpecializedEncoder<Ident> for EncodeContext<'tcx> {
}
}
impl SpecializedEncoder<SyntaxContext> for EncodeContext<'tcx> {
fn specialized_encode(&mut self, _ctxt: &SyntaxContext) -> Result<(), Self::Error> {
// FIXME(jseyfried): intercrate hygiene
Ok(())
}
}
impl<'tcx> SpecializedEncoder<LocalDefId> for EncodeContext<'tcx> {
#[inline]
fn specialized_encode(&mut self, def_id: &LocalDefId) -> Result<(), Self::Error> {

View file

@ -750,7 +750,3 @@ impl Decodable for ExpnId {
Ok(ExpnId::root()) // FIXME(jseyfried) intercrate hygiene
}
}
impl UseSpecializedEncodable for SyntaxContext {}
impl UseSpecializedDecodable for SyntaxContext {}