aboutsummaryrefslogtreecommitdiff
path: root/tests/ui-stable/transmute-illegal.stderr
blob: e9ac2402daa4cd73161f93d98ff67c2ea83ea57d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
error[E0277]: the trait bound `*const usize: AsBytes` is not satisfied
  --> tests/ui-stable/transmute-illegal.rs:10:30
   |
10 | const POINTER_VALUE: usize = zerocopy::transmute!(&0usize as *const usize);
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |                              |
   |                              the trait `AsBytes` is not implemented for `*const usize`
   |                              required by a bound introduced by this call
   |
   = help: the trait `AsBytes` is implemented for `usize`
note: required by a bound in `POINTER_VALUE::transmute`
  --> tests/ui-stable/transmute-illegal.rs:10:30
   |
10 | const POINTER_VALUE: usize = zerocopy::transmute!(&0usize as *const usize);
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `transmute`
   = note: this error originates in the macro `zerocopy::transmute` (in Nightly builds, run with -Z macro-backtrace for more info)