2018-06-19 17:53:51 -05:00
|
|
|
error[E0277]: the size for value values of type `str` cannot be known at compilation time
|
2018-01-28 13:23:49 -06:00
|
|
|
--> $DIR/sized-yield.rs:17:26
|
|
|
|
|
|
2018-06-09 18:53:36 -05:00
|
|
|
LL | let mut gen = move || {
|
2018-01-28 13:23:49 -06:00
|
|
|
| __________________________^
|
2018-06-19 17:53:51 -05:00
|
|
|
LL | | //~^ ERROR the size for value values of type
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | | yield s[..];
|
|
|
|
LL | | };
|
2018-06-19 17:53:51 -05:00
|
|
|
| |____^ doesn't have a size known at compile-time
|
2018-01-28 13:23:49 -06:00
|
|
|
|
|
|
|
|
= help: the trait `std::marker::Sized` is not implemented for `str`
|
2018-06-09 20:37:52 -05:00
|
|
|
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
|
2018-01-28 13:23:49 -06:00
|
|
|
= note: the yield type of a generator must have a statically known size
|
|
|
|
|
2018-06-19 17:53:51 -05:00
|
|
|
error[E0277]: the size for value values of type `str` cannot be known at compilation time
|
2018-06-09 18:53:36 -05:00
|
|
|
--> $DIR/sized-yield.rs:21:17
|
2018-01-28 13:23:49 -06:00
|
|
|
|
|
2018-06-09 18:53:36 -05:00
|
|
|
LL | unsafe { gen.resume(); }
|
2018-06-19 17:53:51 -05:00
|
|
|
| ^^^^^^ doesn't have a size known at compile-time
|
2018-01-28 13:23:49 -06:00
|
|
|
|
|
|
|
|
= help: the trait `std::marker::Sized` is not implemented for `str`
|
2018-06-09 20:37:52 -05:00
|
|
|
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
|
2018-01-28 13:23:49 -06:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about this error, try `rustc --explain E0277`.
|