aboutsummaryrefslogtreecommitdiff
path: root/tests/ui-nightly/transmute-illegal.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui-nightly/transmute-illegal.stderr')
-rw-r--r--tests/ui-nightly/transmute-illegal.stderr16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui-nightly/transmute-illegal.stderr b/tests/ui-nightly/transmute-illegal.stderr
new file mode 100644
index 0000000..a57544b
--- /dev/null
+++ b/tests/ui-nightly/transmute-illegal.stderr
@@ -0,0 +1,16 @@
+error[E0277]: the trait bound `*const usize: AsBytes` is not satisfied
+ --> tests/ui-nightly/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-nightly/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)