Debian Codegraph @

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

raw
1 error[E0277]: the trait bound `NotZerocopy: zerocopy::Immutable` is not satisfied
2 --> tests/ui-stable/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-stable/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-stable/diagnostic-not-implemented-issue-1296.rs:52:19
23 |
24 52 | Foo.write_obj(NotZerocopy(()));
25 | --------- ^^^^^^^^^^^^^^^ the trait `zerocopy::IntoBytes` is not implemented for `NotZerocopy`
26 | |
27 | required by a bound introduced by this call
28 |
29 = note: Consider adding `#[derive(IntoBytes)]` to `NotZerocopy`
30 = help: the following other types implement trait `zerocopy::IntoBytes`:
31 ()
32 AU16
33 AtomicBool
34 AtomicI16
35 AtomicI32
36 AtomicI64
37 AtomicI8
38 AtomicIsize
39 and $N others
40 note: required by a bound in `Foo::write_obj`
41 --> tests/ui-stable/diagnostic-not-implemented-issue-1296.rs:58:33
42 |
43 58 | fn write_obj<T: Immutable + IntoBytes>(&mut self, _val: T) {}
44 | ^^^^^^^^^ required by this bound in `Foo::write_obj`