You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 28, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: src/test/ui/consts/const-blocks/fn-call-in-non-const.stderr
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,17 @@
1
-
error[E0277]: the trait bound `Option<Bar>: Copy` is not satisfied
2
-
--> $DIR/fn-call-in-non-const.rs:14:31
1
+
error[E0277]: the trait bound `Bar: Copy` is not satisfied
2
+
--> $DIR/fn-call-in-non-const.rs:14:32
3
3
|
4
4
LL | let _: [Option<Bar>; 2] = [no_copy(); 2];
5
-
| ^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Option<Bar>`
5
+
| ^^^^^^^^^ the trait `Copy` is not implemented for `Bar`
6
6
|
7
-
= help: the trait `Copy` is implemented for `Option<T>`
7
+
= note: required because of the requirements on the impl of `Copy` for `Option<Bar>`
8
8
= note: the `Copy` trait is required because the repeated element will be copied
9
9
= help: consider creating a new `const` item and initializing it 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];`
10
10
= help: create an inline `const` block, see RFC #2920 <https://github.com/rust-lang/rfcs/pull/2920> for more information
11
+
help: consider annotating `Bar` with `#[derive(Copy)]`
0 commit comments