2024-03-13 00:11:36 +00:00
|
|
|
error[E0277]: `&Unit` cannot be safely transmuted into `&u8`
|
2024-02-26 16:49:25 +00:00
|
|
|
--> $DIR/unit-to-u8.rs:22:52
|
2021-07-03 12:18:13 -04:00
|
|
|
|
|
2023-04-21 16:49:36 -07:00
|
|
|
LL | assert::is_maybe_transmutable::<&'static Unit, &'static u8>();
|
2024-03-15 17:55:49 +00:00
|
|
|
| ^^^^^^^^^^^ the referent size of `&Unit` (0 bytes) is smaller than that of `&u8` (1 bytes)
|
2021-07-03 12:18:13 -04:00
|
|
|
|
|
|
|
|
note: required by a bound in `is_maybe_transmutable`
|
2024-02-26 16:49:25 +00:00
|
|
|
--> $DIR/unit-to-u8.rs:9:14
|
2021-07-03 12:18:13 -04:00
|
|
|
|
|
2022-08-18 19:39:14 +00:00
|
|
|
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
2023-02-21 05:21:07 +00:00
|
|
|
| --------------------- required by a bound in this function
|
2022-08-18 19:39:14 +00:00
|
|
|
LL | where
|
2024-02-26 16:49:25 +00:00
|
|
|
LL | Dst: BikeshedIntrinsicFrom<Src, {
|
2022-08-18 19:39:14 +00:00
|
|
|
| ______________^
|
|
|
|
LL | | Assume {
|
|
|
|
LL | | alignment: true,
|
|
|
|
LL | | lifetimes: true,
|
|
|
|
... |
|
|
|
|
LL | | }
|
|
|
|
LL | | }>
|
|
|
|
| |__________^ required by this bound in `is_maybe_transmutable`
|
2021-07-03 12:18:13 -04:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2021-07-03 12:18:13 -04:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|