2020-09-02 02:40:56 -05:00
error[E0277]: the trait bound `Option<Bar>: Copy` is not satisfied
2021-01-26 16:49:30 -06:00
--> $DIR/fn-call-in-non-const.rs:14:31
2019-06-13 11:30:49 -05:00
|
2019-11-22 12:45:49 -06:00
LL | let _: [Option<Bar>; 2] = [no_copy(); 2];
2020-09-02 02:40:56 -05:00
| ^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Option<Bar>`
2019-06-13 11:30:49 -05:00
|
= help: the following implementations were found:
2020-09-02 02:40:56 -05:00
<Option<T> as Copy>
2019-06-13 11:30:49 -05:00
= note: the `Copy` trait is required because the repeated element will be copied
2021-02-13 22:38:37 -06:00
= help: consider creating a new `const` item and initializing with the result of the function call to be used in the repeat position, like `const VAL: Type = const_fn();` and `let x = [VAL; 42];`
2021-01-29 00:24:19 -06:00
= help: create an inline `const` block, see PR #2920 <https://github.com/rust-lang/rfcs/pull/2920> for more information
2019-06-13 11:30:49 -05:00
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.