error[E0277]: `str` does not have a constant size known at compile-time --> $DIR/sized-yield.rs:17:26 | LL | let mut gen = move || { | __________________________^ LL | | //~^ ERROR `str` does not have a constant size known at compile-time LL | | yield s[..]; LL | | }; | |____^ `str` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `str` = note: to learn more, visit = note: the yield type of a generator must have a statically known size error[E0277]: `str` does not have a constant size known at compile-time --> $DIR/sized-yield.rs:21:17 | LL | unsafe { gen.resume(); } | ^^^^^^ `str` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `str` = note: to learn more, visit error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0277`.