File: diagnostic-not-implemented-issue-1296.stderr

package info (click to toggle)
rust-zerocopy 0.8.26-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,748 kB
  • sloc: sh: 116; makefile: 2
file content (44 lines) | stat: -rw-r--r-- 1,833 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
error[E0277]: the trait bound `NotZerocopy: zerocopy::Immutable` is not satisfied
  --> tests/ui-stable/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-stable/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-stable/diagnostic-not-implemented-issue-1296.rs:52:19
   |
52 |     Foo.write_obj(NotZerocopy(()));
   |         --------- ^^^^^^^^^^^^^^^ the trait `zerocopy::IntoBytes` is not implemented for `NotZerocopy`
   |         |
   |         required by a bound introduced by this call
   |
   = 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-stable/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`