get rid of lazy

This commit is contained in:
mark 2020-02-22 13:05:32 -06:00
parent 74360571e9
commit 9207a13bfc
3 changed files with 3 additions and 3 deletions

View File

@ -1392,7 +1392,7 @@ impl<'a, 'tcx> CrateMetadata {
fn generator_kind(&self, id: DefIndex) -> Option<hir::GeneratorKind> {
match self.kind(id) {
EntryKind::Generator(data) => Some(data.decode(self)),
EntryKind::Generator(data) => Some(data),
_ => None,
}
}

View File

@ -1268,7 +1268,7 @@ impl EncodeContext<'tcx> {
record!(self.per_def.kind[def_id] <- match ty.kind {
ty::Generator(..) => {
let data = self.tcx.generator_kind(def_id).unwrap();
EntryKind::Generator(self.lazy(data))
EntryKind::Generator(data)
}
ty::Closure(..) => EntryKind::Closure,

View File

@ -302,7 +302,7 @@ enum EntryKind {
Mod(Lazy<ModData>),
MacroDef(Lazy<MacroDef>),
Closure,
Generator(Lazy<hir::GeneratorKind>),
Generator(hir::GeneratorKind),
Trait(Lazy<TraitData>),
Impl(Lazy<ImplData>),
Method(Lazy<MethodData>),