File: transmute-size-increase-allow-shrink.stderr

package info (click to toggle)
rust-zerocopy 0.8.26-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,748 kB
  • sloc: sh: 116; makefile: 2
file content (9 lines) | stat: -rw-r--r-- 520 bytes parent folder | download
1
2
3
4
5
6
7
8
9
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
  --> tests/ui-stable/transmute-size-increase-allow-shrink.rs:20:29
   |
20 | const INCREASE_SIZE: AU16 = transmute!(#![allow(shrink)] 0u8);
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: source type: `u8` (8 bits)
   = note: target type: `Transmute<u8, AU16>` (16 bits)
   = note: this error originates in the macro `transmute` (in Nightly builds, run with -Z macro-backtrace for more info)