aboutsummaryrefslogtreecommitdiff
path: root/tests/ui-stable/transmute-ptr-to-usize.stderr
blob: 4f4d583dbe5bf61682f05598de9d49677aba69d9 (plain)
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
error[E0277]: the trait bound `*const usize: AsBytes` is not satisfied
  --> tests/ui-stable/transmute-ptr-to-usize.rs:20:30
   |
20 | const POINTER_VALUE: usize = 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 `AssertIsAsBytes`
  --> tests/ui-stable/transmute-ptr-to-usize.rs:20:30
   |
20 | const POINTER_VALUE: usize = transmute!(&0usize as *const usize);
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertIsAsBytes`
   = note: this error originates in the macro `transmute` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `*const usize: AsBytes` is not satisfied
  --> tests/ui-stable/transmute-ptr-to-usize.rs:20:30
   |
20 | const POINTER_VALUE: usize = transmute!(&0usize as *const usize);
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsBytes` is not implemented for `*const usize`
   |
   = help: the trait `AsBytes` is implemented for `usize`
note: required by a bound in `AssertIsAsBytes`
  --> tests/ui-stable/transmute-ptr-to-usize.rs:20:30
   |
20 | const POINTER_VALUE: usize = transmute!(&0usize as *const usize);
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertIsAsBytes`
   = note: this error originates in the macro `transmute` (in Nightly builds, run with -Z macro-backtrace for more info)