Debian Codegraph @

.cargo/vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-issue-1296.stderr

raw
1 error[E0277]: the trait bound `NotZerocopy: zerocopy::Immutable` is not satisfied
2 --> tests/ui-nightly/diagnostic-not-implemented-issue-1296.rs:52:19
3 |
4 52 | Foo.write_obj(NotZerocopy(()));
5 | --------- ^^^^^^^^^^^^^^^ the trait `zerocopy::Immutable` is not implemented for `NotZerocopy`
6 | |
7 | required by a bound introduced by this call
8 |
9 note: required by a bound in `Foo::write_obj`
10 --> tests/ui-nightly/diagnostic-not-implemented-issue-1296.rs:58:21
11 |
12 58 | fn write_obj<T: Immutable + IntoBytes>(&mut self, _val: T) {}
13 | ^^^^^^^^^ required by this bound in `Foo::write_obj`
14 help: consider borrowing here
15 |
16 52 | Foo.write_obj(&NotZerocopy(()));
17 | +
18 52 | Foo.write_obj(&mut NotZerocopy(()));
19 | ++++
20
21 error[E0277]: the trait bound `NotZerocopy: zerocopy::IntoBytes` is not satisfied
22 --> tests/ui-nightly/diagnostic-not-implemented-issue-1296.rs:52:19
23 |
24 52 | Foo.write_obj(NotZerocopy(()));
25 | --------- ^^^^^^^^^^^^^^^ unsatisfied trait bound
26 | |
27 | required by a bound introduced by this call
28 |
29 help: the trait `zerocopy::IntoBytes` is not implemented for `NotZerocopy`
30 --> tests/ui-nightly/../../zerocopy-derive/tests/include.rs
31 |
32 | pub struct NotZerocopy<T = ()>(pub T);
33 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34 = note: Consider adding `#[derive(IntoBytes)]` to `NotZerocopy`
35 = help: the following other types implement trait `zerocopy::IntoBytes`:
36 ()
37 AU16
38 AtomicBool
39 AtomicI16
40 AtomicI32
41 AtomicI64
42 AtomicI8
43 AtomicIsize
44 and $N others
45 note: required by a bound in `Foo::write_obj`
46 --> tests/ui-nightly/diagnostic-not-implemented-issue-1296.rs:58:33
47 |
48 58 | fn write_obj<T: Immutable + IntoBytes>(&mut self, _val: T) {}
49 | ^^^^^^^^^ required by this bound in `Foo::write_obj`