Require T: Copy
for hint::select_unpredictable
by Amanieu · Pull Request #139933 · rust-lang/rust (original) (raw)
The job mingw-check
failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
---- library/core/src/hint.rs - hint::select_unpredictable (line 764) stdout ----
error[E0277]: the trait bound `&mut Vec<i32>: Copy` is not satisfied
--> library/core/src/hint.rs:773:18
|
12 | let bucket = hint::select_unpredictable(hash % 2 == 0, bucket_one, bucket_two);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `&mut Vec<i32>`
|
= note: `Copy` is implemented for `&Vec<i32>`, but not for `&mut Vec<i32>`
note: required by a bound in `std::hint::select_unpredictable`
--> /checkout/library/core/src/hint.rs:783:32
|
783 | pub fn select_unpredictable<T: Copy>(condition: bool, true_val: T, false_val: T) -> T {
| ^^^^ required by this bound in `select_unpredictable`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.