Do not fetch type to check generator.
This commit is contained in:
parent
108decec53
commit
d0cba3df97
1 changed files with 1 additions and 1 deletions
|
@ -84,9 +84,9 @@ impl<'tcx> MirPass<'tcx> for ConstProp {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let is_generator = tcx.type_of(def_id.to_def_id()).instantiate_identity().is_generator();
|
|
||||||
// FIXME(welseywiser) const prop doesn't work on generators because of query cycles
|
// FIXME(welseywiser) const prop doesn't work on generators because of query cycles
|
||||||
// computing their layout.
|
// computing their layout.
|
||||||
|
let is_generator = def_kind == DefKind::Generator;
|
||||||
if is_generator {
|
if is_generator {
|
||||||
trace!("ConstProp skipped for generator {:?}", def_id);
|
trace!("ConstProp skipped for generator {:?}", def_id);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue