Auto merge of #81114 - bugadani:generator, r=estebank
Box generator-related Body fields Might save some memory on functions that aren't generators.
This commit is contained in:
commit
6f7673d077
14 changed files with 89 additions and 54 deletions
|
@ -222,7 +222,7 @@ impl Validator<'mir, 'tcx> {
|
|||
|
||||
// `async` functions cannot be `const fn`. This is checked during AST lowering, so there's
|
||||
// no need to emit duplicate errors here.
|
||||
if is_async_fn(self.ccx) || body.generator_kind.is_some() {
|
||||
if is_async_fn(self.ccx) || body.generator.is_some() {
|
||||
tcx.sess.delay_span_bug(body.span, "`async` functions cannot be `const fn`");
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue