Skip to content

Commit 4912d12

Browse files
authored
Rollup merge of rust-lang#149388 - jdonszelmann:rm-sess-blob, r=jieyouxu
remove session+blob decoder construction turns out, we only did that in one place and we didn't need it.... Working on ways to make this statically known in the future. For now just a smol deletion :3
2 parents 66c0e1c + e399091 commit 4912d12

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)