remove session+blob decoder construction
This commit is contained in:
parent
42ec52baba
commit
e399091785
2 changed files with 1 additions and 16 deletions
|
|
@ -683,7 +683,6 @@ impl CStore {
|
|||
};
|
||||
|
||||
let crate_metadata = CrateMetadata::new(
|
||||
tcx.sess,
|
||||
self,
|
||||
metadata,
|
||||
crate_root,
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue