Skip to content

Commit 2808038

Browse files
authored
Rollup merge of #80039 - LeSeulArtichaut:rm-tyencoder-tcx, r=matthewjasper
Remove unused `TyEncoder::tcx` required method Unsure if this is helpful or not... r? ``@ghost`` cc ``@matthewjasper`` ``@jackh726``
2 parents f645e30 + a72b739 commit 2808038

File tree

3 files changed

+0
-8
lines changed

3 files changed

+0
-8
lines changed

compiler/rustc_metadata/src/rmeta/encoder.rs

-4
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,6 @@ impl<'a, 'tcx> TyEncoder<'tcx> for EncodeContext<'a, 'tcx> {
319319
self.opaque.position()
320320
}
321321

322-
fn tcx(&self) -> TyCtxt<'tcx> {
323-
self.tcx
324-
}
325-
326322
fn type_shorthands(&mut self) -> &mut FxHashMap<Ty<'tcx>, usize> {
327323
&mut self.type_shorthands
328324
}

compiler/rustc_middle/src/ty/codec.rs

-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ impl OpaqueEncoder for rustc_serialize::opaque::Encoder {
6969
pub trait TyEncoder<'tcx>: Encoder {
7070
const CLEAR_CROSS_CRATE: bool;
7171

72-
fn tcx(&self) -> TyCtxt<'tcx>;
7372
fn position(&self) -> usize;
7473
fn type_shorthands(&mut self) -> &mut FxHashMap<Ty<'tcx>, usize>;
7574
fn predicate_shorthands(&mut self) -> &mut FxHashMap<ty::Predicate<'tcx>, usize>;

compiler/rustc_middle/src/ty/query/on_disk_cache.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1044,9 +1044,6 @@ where
10441044
{
10451045
const CLEAR_CROSS_CRATE: bool = false;
10461046

1047-
fn tcx(&self) -> TyCtxt<'tcx> {
1048-
self.tcx
1049-
}
10501047
fn position(&self) -> usize {
10511048
self.encoder.encoder_position()
10521049
}

0 commit comments

Comments
 (0)