diff --git a/compiler/rustc_metadata/src/creader.rs b/compiler/rustc_metadata/src/creader.rs index 4e2e1e21ec6dd..95862ce01687d 100644 --- a/compiler/rustc_metadata/src/creader.rs +++ b/compiler/rustc_metadata/src/creader.rs @@ -683,7 +683,6 @@ impl CStore { }; let crate_metadata = CrateMetadata::new( - tcx.sess, self, metadata, crate_root, diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index 6c796b3a9c8c5..e997ae8a3989f 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder.rs @@ -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 =