|
| 1 | +error[E0277]: the size for values of type `[{integer}]` cannot be known at compilation time |
| 2 | + --> $DIR/closure-capture-uninferred-upvars-with-capture.rs:9:15 |
| 3 | + | |
| 4 | +LL | Some([0]).map(|s| { |
| 5 | + | ^^^ doesn't have a size known at compile-time |
| 6 | + | |
| 7 | + = help: the trait `Sized` is not implemented for `[{integer}]` |
| 8 | +note: required by an implicit `Sized` bound in `Option::<T>::map` |
| 9 | + --> $SRC_DIR/core/src/option.rs:LL:COL |
| 10 | + |
| 11 | +error[E0277]: the size for values of type `[{integer}]` cannot be known at compilation time |
| 12 | + --> $DIR/closure-capture-uninferred-upvars-with-capture.rs:9:23 |
| 13 | + | |
| 14 | +LL | Some([0]).map(|s| { |
| 15 | + | _______________________^ |
| 16 | +... | |
| 17 | +LL | | s[..] |
| 18 | +LL | | }); |
| 19 | + | |_____^ doesn't have a size known at compile-time |
| 20 | + | |
| 21 | + = help: the trait `Sized` is not implemented for `[{integer}]` |
| 22 | + = note: the return type of a function must have a statically known size |
| 23 | + |
| 24 | +error[E0277]: the size for values of type `[{integer}]` cannot be known at compilation time |
| 25 | + --> $DIR/closure-capture-uninferred-upvars-with-capture.rs:9:19 |
| 26 | + | |
| 27 | +LL | Some([0]).map(|s| { |
| 28 | + | --- ^-- |
| 29 | + | | | |
| 30 | + | _______________|___within this `{closure@$DIR/closure-capture-uninferred-upvars-with-capture.rs:9:19: 9:22}` |
| 31 | + | | | |
| 32 | + | | required by a bound introduced by this call |
| 33 | +... | |
| 34 | +LL | | s[..] |
| 35 | +LL | | }); |
| 36 | + | |_____^ doesn't have a size known at compile-time |
| 37 | + | |
| 38 | + = help: within `{closure@$DIR/closure-capture-uninferred-upvars-with-capture.rs:9:19: 9:22}`, the trait `Sized` is not implemented for `[{integer}]` |
| 39 | +note: required because it's used within this closure |
| 40 | + --> $DIR/closure-capture-uninferred-upvars-with-capture.rs:9:19 |
| 41 | + | |
| 42 | +LL | Some([0]).map(|s| { |
| 43 | + | ^^^ |
| 44 | +note: required by a bound in `Option::<T>::map` |
| 45 | + --> $SRC_DIR/core/src/option.rs:LL:COL |
| 46 | + |
| 47 | +error: aborting due to 3 previous errors |
| 48 | + |
| 49 | +For more information about this error, try `rustc --explain E0277`. |
0 commit comments