Move encode_metadata out of CrateStore.

This commit is contained in:
Camille GILLOT
2020-11-14 01:59:00 +01:00
parent 11491938f8
commit df54d3980b
9 changed files with 14 additions and 21 deletions

View File

@@ -7,7 +7,6 @@ use crate::ich::{NodeIdHashingMode, StableHashingContext};
use crate::infer::canonical::{Canonical, CanonicalVarInfo, CanonicalVarInfos};
use crate::lint::{struct_lint_level, LintDiagnosticBuilder, LintLevelSource};
use crate::middle;
use crate::middle::cstore::EncodedMetadata;
use crate::middle::resolve_lifetime::{self, LifetimeScopeForPath, ObjectLifetimeDefault};
use crate::middle::stability;
use crate::mir::interpret::{self, AllocId, Allocation, ConstValue, Scalar};
@@ -1324,11 +1323,6 @@ impl<'tcx> TyCtxt<'tcx> {
)
}
pub fn encode_metadata(self) -> EncodedMetadata {
let _prof_timer = self.prof.verbose_generic_activity("generate_crate_metadata");
self.untracked_resolutions.cstore.encode_metadata(self)
}
/// Note that this is *untracked* and should only be used within the query
/// system if the result is otherwise tracked through queries
pub fn cstore_untracked(self) -> &'tcx ty::CrateStoreDyn {