get rid of lazy
This commit is contained in:
parent
74360571e9
commit
9207a13bfc
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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>),
|
||||
|
|
Loading…
Reference in New Issue