| 1 |
error[E0277]: the trait bound `NotZerocopy: zerocopy::Immutable` is not satisfied |
| 2 |
--> tests/ui-nightly/diagnostic-not-implemented-immutable.rs:18:23 |
| 3 |
| |
| 4 |
18 | takes_immutable::<NotZerocopy>(); |
| 5 |
| ^^^^^^^^^^^ unsatisfied trait bound |
| 6 |
| |
| 7 |
help: the trait `zerocopy::Immutable` is not implemented for `NotZerocopy` |
| 8 |
--> tests/ui-nightly/../../zerocopy-derive/tests/include.rs |
| 9 |
| |
| 10 |
| pub struct NotZerocopy<T = ()>(pub T); |
| 11 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 12 |
= note: Consider adding `#[derive(Immutable)]` to `NotZerocopy` |
| 13 |
= help: the following other types implement trait `zerocopy::Immutable`: |
| 14 |
&T |
| 15 |
&mut T |
| 16 |
() |
| 17 |
*const T |
| 18 |
*mut T |
| 19 |
AU16 |
| 20 |
Box<T> |
| 21 |
F32<O> |
| 22 |
and $N others |
| 23 |
note: required by a bound in `takes_immutable` |
| 24 |
--> tests/ui-nightly/diagnostic-not-implemented-immutable.rs:21:23 |
| 25 |
| |
| 26 |
21 | fn takes_immutable<T: Immutable>() {} |
| 27 |
| ^^^^^^^^^ required by this bound in `takes_immutable` |