get rid of lazy
This commit is contained in:
parent
74360571e9
commit
9207a13bfc
3 changed files with 3 additions and 3 deletions
|
@ -1392,7 +1392,7 @@ impl<'a, 'tcx> CrateMetadata {
|
||||||
|
|
||||||
fn generator_kind(&self, id: DefIndex) -> Option<hir::GeneratorKind> {
|
fn generator_kind(&self, id: DefIndex) -> Option<hir::GeneratorKind> {
|
||||||
match self.kind(id) {
|
match self.kind(id) {
|
||||||
EntryKind::Generator(data) => Some(data.decode(self)),
|
EntryKind::Generator(data) => Some(data),
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1268,7 +1268,7 @@ impl EncodeContext<'tcx> {
|
||||||
record!(self.per_def.kind[def_id] <- match ty.kind {
|
record!(self.per_def.kind[def_id] <- match ty.kind {
|
||||||
ty::Generator(..) => {
|
ty::Generator(..) => {
|
||||||
let data = self.tcx.generator_kind(def_id).unwrap();
|
let data = self.tcx.generator_kind(def_id).unwrap();
|
||||||
EntryKind::Generator(self.lazy(data))
|
EntryKind::Generator(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
ty::Closure(..) => EntryKind::Closure,
|
ty::Closure(..) => EntryKind::Closure,
|
||||||
|
|
|
@ -302,7 +302,7 @@ enum EntryKind {
|
||||||
Mod(Lazy<ModData>),
|
Mod(Lazy<ModData>),
|
||||||
MacroDef(Lazy<MacroDef>),
|
MacroDef(Lazy<MacroDef>),
|
||||||
Closure,
|
Closure,
|
||||||
Generator(Lazy<hir::GeneratorKind>),
|
Generator(hir::GeneratorKind),
|
||||||
Trait(Lazy<TraitData>),
|
Trait(Lazy<TraitData>),
|
||||||
Impl(Lazy<ImplData>),
|
Impl(Lazy<ImplData>),
|
||||||
Method(Lazy<MethodData>),
|
Method(Lazy<MethodData>),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue