s/generator/coroutine/
This commit is contained in:
parent
60956837cf
commit
e96ce20b34
468 changed files with 2201 additions and 2197 deletions
|
@ -82,11 +82,11 @@ impl<'tcx> MirPass<'tcx> for ConstProp {
|
|||
return;
|
||||
}
|
||||
|
||||
// FIXME(welseywiser) const prop doesn't work on generators because of query cycles
|
||||
// FIXME(welseywiser) const prop doesn't work on coroutines because of query cycles
|
||||
// computing their layout.
|
||||
let is_generator = def_kind == DefKind::Coroutine;
|
||||
if is_generator {
|
||||
trace!("ConstProp skipped for generator {:?}", def_id);
|
||||
let is_coroutine = def_kind == DefKind::Coroutine;
|
||||
if is_coroutine {
|
||||
trace!("ConstProp skipped for coroutine {:?}", def_id);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -512,7 +512,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
|
|||
|
||||
fn replace_with_const(&mut self, place: Place<'tcx>) -> Option<Const<'tcx>> {
|
||||
// This will return None if the above `const_prop` invocation only "wrote" a
|
||||
// type whose creation requires no write. E.g. a generator whose initial state
|
||||
// type whose creation requires no write. E.g. a coroutine whose initial state
|
||||
// consists solely of uninitialized memory (so it doesn't capture any locals).
|
||||
let value = self.get_const(place)?;
|
||||
if !self.tcx.consider_optimizing(|| format!("ConstantPropagation - {value:?}")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue