1
Fork 0

Prevent generators from being movable

This commit is contained in:
Oli Scherer 2023-10-24 10:03:40 +00:00
parent 4ac25faf9f
commit 6223744078
3 changed files with 29 additions and 1 deletions

View file

@ -715,7 +715,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
body,
fn_decl_span: self.lower_span(span),
fn_arg_span: None,
movability: Some(hir::Movability::Static),
movability: Some(Movability::Movable),
constness: hir::Constness::NotConst,
}))
}