]>
Commit | Line | Data |
---|---|---|
8faf50e0 | 1 | error[E0277]: the size for values of type `str` cannot be known at compilation time |
9fa01778 | 2 | --> $DIR/sized-yield.rs:8:26 |
2c00a5a8 | 3 | | |
8faf50e0 | 4 | LL | let mut gen = move || { |
2c00a5a8 | 5 | | __________________________^ |
8faf50e0 | 6 | LL | | //~^ ERROR the size for values of type |
0531ce1d XL |
7 | LL | | yield s[..]; |
8 | LL | | }; | |
8faf50e0 | 9 | | |____^ doesn't have a size known at compile-time |
2c00a5a8 XL |
10 | | |
11 | = help: the trait `std::marker::Sized` is not implemented for `str` | |
0731742a | 12 | = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> |
2c00a5a8 XL |
13 | = note: the yield type of a generator must have a statically known size |
14 | ||
8faf50e0 | 15 | error[E0277]: the size for values of type `str` cannot be known at compilation time |
9fa01778 | 16 | --> $DIR/sized-yield.rs:12:23 |
2c00a5a8 | 17 | | |
9fa01778 XL |
18 | LL | Pin::new(&mut gen).resume(); |
19 | | ^^^^^^ doesn't have a size known at compile-time | |
2c00a5a8 XL |
20 | | |
21 | = help: the trait `std::marker::Sized` is not implemented for `str` | |
0731742a | 22 | = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> |
2c00a5a8 XL |
23 | |
24 | error: aborting due to 2 previous errors | |
25 | ||
0531ce1d | 26 | For more information about this error, try `rustc --explain E0277`. |