Skip to content

Commit e399091

Browse files
committed
remove session+blob decoder construction
1 parent 42ec52b commit e399091

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

compiler/rustc_metadata/src/creader.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,6 @@ impl CStore {
683683
};
684684

685685
let crate_metadata = CrateMetadata::new(
686-
tcx.sess,
687686
self,
688687
metadata,
689688
crate_root,

compiler/rustc_metadata/src/rmeta/decoder.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -211,19 +211,6 @@ impl<'a, 'tcx> Metadata<'a, 'tcx> for &'a MetadataBlob {
211211
}
212212
}
213213

214-
impl<'a, 'tcx> Metadata<'a, 'tcx> for (&'a MetadataBlob, &'tcx Session) {
215-
#[inline]
216-
fn blob(self) -> &'a MetadataBlob {
217-
self.0
218-
}
219-
220-
#[inline]
221-
fn sess(self) -> Option<&'tcx Session> {
222-
let (_, sess) = self;
223-
Some(sess)
224-
}
225-
}
226-
227214
impl<'a, 'tcx> Metadata<'a, 'tcx> for CrateMetadataRef<'a> {
228215
#[inline]
229216
fn blob(self) -> &'a MetadataBlob {
@@ -1862,7 +1849,6 @@ impl<'a> CrateMetadataRef<'a> {
18621849

18631850
impl CrateMetadata {
18641851
pub(crate) fn new(
1865-
sess: &Session,
18661852
cstore: &CStore,
18671853
blob: MetadataBlob,
18681854
root: CrateRoot,
@@ -1876,7 +1862,7 @@ impl CrateMetadata {
18761862
) -> CrateMetadata {
18771863
let trait_impls = root
18781864
.impls
1879-
.decode((&blob, sess))
1865+
.decode(&blob)
18801866
.map(|trait_impls| (trait_impls.trait_id, trait_impls.impls))
18811867
.collect();
18821868
let alloc_decoding_state =

0 commit comments

Comments
 (0)