Closed
Description
Immovable generators require unsafe block, thus allowing every unsafe function inside generator to work. There is no way to say I want immovable generator, but its body should not be marked unsafe.
unsafe {
static || {
yield;
let a = Box::from_raw(0 as *mut usize);
}
};
It can probably be fixed by adding new ImmovableGenerator
trait and making creation of immovable generators safe.
cc @Zoxc