Skip to content

Commit

Permalink
Remove unused SyntaxContext serialization impls
Browse files Browse the repository at this point in the history
The implementations were wrong and unused.
  • Loading branch information
matthewjasper committed Aug 17, 2019
1 parent d04af19 commit 1c0a546
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 20 deletions.
8 changes: 0 additions & 8 deletions src/librustc_metadata/decoder.rs
Expand Up @@ -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)
Expand Down
8 changes: 0 additions & 8 deletions src/librustc_metadata/encoder.rs
Expand Up @@ -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};
Expand Down Expand Up @@ -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> {
Expand Down
4 changes: 0 additions & 4 deletions src/libsyntax_pos/hygiene.rs
Expand Up @@ -750,7 +750,3 @@ impl Decodable for ExpnId {
Ok(ExpnId::root()) // FIXME(jseyfried) intercrate hygiene
}
}

impl UseSpecializedEncodable for SyntaxContext {}

impl UseSpecializedDecodable for SyntaxContext {}

0 comments on commit 1c0a546

Please sign in to comment.