Debian Codegraph @

third_party/rust/zerocopy/tests/ui-stable/transmute-ptr-to-usize.stderr

raw
1 error[E0277]: the trait bound `*const usize: AsBytes` is not satisfied
2 --> tests/ui-stable/transmute-ptr-to-usize.rs:20:30
3 |
4 20 | const POINTER_VALUE: usize = transmute!(&0usize as *const usize);
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 | |
7 | the trait `AsBytes` is not implemented for `*const usize`
8 | required by a bound introduced by this call
9 |
10 = help: the trait `AsBytes` is implemented for `usize`
11 note: required by a bound in `AssertIsAsBytes`
12 --> tests/ui-stable/transmute-ptr-to-usize.rs:20:30
13 |
14 20 | const POINTER_VALUE: usize = transmute!(&0usize as *const usize);
15 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertIsAsBytes`
16 = note: this error originates in the macro `transmute` (in Nightly builds, run with -Z macro-backtrace for more info)
17
18 error[E0277]: the trait bound `*const usize: AsBytes` is not satisfied
19 --> tests/ui-stable/transmute-ptr-to-usize.rs:20:30
20 |
21 20 | const POINTER_VALUE: usize = transmute!(&0usize as *const usize);
22 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsBytes` is not implemented for `*const usize`
23 |
24 = help: the trait `AsBytes` is implemented for `usize`
25 note: required by a bound in `AssertIsAsBytes`
26 --> tests/ui-stable/transmute-ptr-to-usize.rs:20:30
27 |
28 20 | const POINTER_VALUE: usize = transmute!(&0usize as *const usize);
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertIsAsBytes`
30 = note: this error originates in the macro `transmute` (in Nightly builds, run with -Z macro-backtrace for more info)