• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error[E0277]: the trait bound `*const usize: AsBytes` is not satisfied
2  --> tests/ui-msrv/transmute-ptr-to-usize.rs:20:30
3   |
420 | const POINTER_VALUE: usize = transmute!(&0usize as *const usize);
5   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsBytes` is not implemented for `*const usize`
6   |
7   = help: the following implementations were found:
8             <usize as AsBytes>
9             <f32 as AsBytes>
10             <f64 as AsBytes>
11             <i128 as AsBytes>
12           and $N others
13note: required by a bound in `AssertIsAsBytes`
14  --> tests/ui-msrv/transmute-ptr-to-usize.rs:20:30
15   |
1620 | const POINTER_VALUE: usize = transmute!(&0usize as *const usize);
17   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertIsAsBytes`
18   = note: this error originates in the macro `transmute` (in Nightly builds, run with -Z macro-backtrace for more info)
19
20error[E0277]: the trait bound `*const usize: AsBytes` is not satisfied
21  --> tests/ui-msrv/transmute-ptr-to-usize.rs:20:30
22   |
2320 | const POINTER_VALUE: usize = transmute!(&0usize as *const usize);
24   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsBytes` is not implemented for `*const usize`
25   |
26   = help: the following implementations were found:
27             <usize as AsBytes>
28             <f32 as AsBytes>
29             <f64 as AsBytes>
30             <i128 as AsBytes>
31           and $N others
32note: required by a bound in `AssertIsAsBytes`
33  --> tests/ui-msrv/transmute-ptr-to-usize.rs:20:30
34   |
3520 | const POINTER_VALUE: usize = transmute!(&0usize as *const usize);
36   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertIsAsBytes`
37   = note: this error originates in the macro `transmute` (in Nightly builds, run with -Z macro-backtrace for more info)
38