50 lines
2.0 KiB
Plaintext
50 lines
2.0 KiB
Plaintext
error[E0277]: the trait bound `NotZerocopy: zerocopy::Immutable` is not satisfied
|
|
--> tests/ui-nightly/diagnostic-not-implemented-issue-1296.rs:52:19
|
|
|
|
|
52 | Foo.write_obj(NotZerocopy(()));
|
|
| --------- ^^^^^^^^^^^^^^^ the trait `zerocopy::Immutable` is not implemented for `NotZerocopy`
|
|
| |
|
|
| required by a bound introduced by this call
|
|
|
|
|
note: required by a bound in `Foo::write_obj`
|
|
--> tests/ui-nightly/diagnostic-not-implemented-issue-1296.rs:58:21
|
|
|
|
|
58 | fn write_obj<T: Immutable + IntoBytes>(&mut self, _val: T) {}
|
|
| ^^^^^^^^^ required by this bound in `Foo::write_obj`
|
|
help: consider borrowing here
|
|
|
|
|
52 | Foo.write_obj(&NotZerocopy(()));
|
|
| +
|
|
52 | Foo.write_obj(&mut NotZerocopy(()));
|
|
| ++++
|
|
|
|
error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not satisfied
|
|
--> tests/ui-nightly/diagnostic-not-implemented-issue-1296.rs:52:19
|
|
|
|
|
52 | Foo.write_obj(NotZerocopy(()));
|
|
| --------- ^^^^^^^^^^^^^^^ unsatisfied trait bound
|
|
| |
|
|
| required by a bound introduced by this call
|
|
|
|
|
help: the trait `zerocopy::IntoBytes` is not implemented for `NotZerocopy`
|
|
--> tests/ui-nightly/../../zerocopy-derive/tests/include.rs
|
|
|
|
|
| pub struct NotZerocopy<T = ()>(pub T);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
= note: Consider adding `#[derive(IntoBytes)]` to `NotZerocopy`
|
|
= help: the following other types implement trait `zerocopy::IntoBytes`:
|
|
()
|
|
AU16
|
|
AtomicBool
|
|
AtomicI16
|
|
AtomicI32
|
|
AtomicI64
|
|
AtomicI8
|
|
AtomicIsize
|
|
and $N others
|
|
note: required by a bound in `Foo::write_obj`
|
|
--> tests/ui-nightly/diagnostic-not-implemented-issue-1296.rs:58:33
|
|
|
|
|
58 | fn write_obj<T: Immutable + IntoBytes>(&mut self, _val: T) {}
|
|
| ^^^^^^^^^ required by this bound in `Foo::write_obj`
|