Rollup merge of #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
This commit is contained in:
Matthias Krüger 2025-11-27 20:07:15 +01:00 committed by GitHub
commit 4912d12efc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 16 deletions

View file

@ -683,7 +683,6 @@ impl CStore {
};
let crate_metadata = CrateMetadata::new(
tcx.sess,
self,
metadata,
crate_root,

View file

@ -211,19 +211,6 @@ impl<'a, 'tcx> Metadata<'a, 'tcx> for &'a MetadataBlob {
}
}
impl<'a, 'tcx> Metadata<'a, 'tcx> for (&'a MetadataBlob, &'tcx Session) {
#[inline]
fn blob(self) -> &'a MetadataBlob {
self.0
}
#[inline]
fn sess(self) -> Option<&'tcx Session> {
let (_, sess) = self;
Some(sess)
}
}
impl<'a, 'tcx> Metadata<'a, 'tcx> for CrateMetadataRef<'a> {
#[inline]
fn blob(self) -> &'a MetadataBlob {
@ -1862,7 +1849,6 @@ impl<'a> CrateMetadataRef<'a> {
impl CrateMetadata {
pub(crate) fn new(
sess: &Session,
cstore: &CStore,
blob: MetadataBlob,
root: CrateRoot,
@ -1876,7 +1862,7 @@ impl CrateMetadata {
) -> CrateMetadata {
let trait_impls = root
.impls
.decode((&blob, sess))
.decode(&blob)
.map(|trait_impls| (trait_impls.trait_id, trait_impls.impls))
.collect();
let alloc_decoding_state =