Skip to content

Commit

Permalink
Rollup merge of rust-lang#80039 - LeSeulArtichaut:rm-tyencoder-tcx, r…
Browse files Browse the repository at this point in the history
…=matthewjasper

Remove unused `TyEncoder::tcx` required method

Unsure if this is helpful or not...

r? `@ghost` cc `@matthewjasper` `@jackh726`
  • Loading branch information
Dylan-DPC committed Dec 16, 2020
2 parents c6f081a + a72b739 commit 3fbb93b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions compiler/rustc_metadata/src/rmeta/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,6 @@ impl<'a, 'tcx> TyEncoder<'tcx> for EncodeContext<'a, 'tcx> {
self.opaque.position()
}

fn tcx(&self) -> TyCtxt<'tcx> {
self.tcx
}

fn type_shorthands(&mut self) -> &mut FxHashMap<Ty<'tcx>, usize> {
&mut self.type_shorthands
}
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_middle/src/ty/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ impl OpaqueEncoder for rustc_serialize::opaque::Encoder {
pub trait TyEncoder<'tcx>: Encoder {
const CLEAR_CROSS_CRATE: bool;

fn tcx(&self) -> TyCtxt<'tcx>;
fn position(&self) -> usize;
fn type_shorthands(&mut self) -> &mut FxHashMap<Ty<'tcx>, usize>;
fn predicate_shorthands(&mut self) -> &mut FxHashMap<ty::Predicate<'tcx>, usize>;
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_middle/src/ty/query/on_disk_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1044,9 +1044,6 @@ where
{
const CLEAR_CROSS_CRATE: bool = false;

fn tcx(&self) -> TyCtxt<'tcx> {
self.tcx
}
fn position(&self) -> usize {
self.encoder.encoder_position()
}
Expand Down

0 comments on commit 3fbb93b

Please sign in to comment.