fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.2 KiB30 linesraw
1error[E0277]: `&[u8; 0]` cannot be safely transmuted into `&[u16; 0]` in the defining scope of `assert::Context`
2  --> $DIR/align-fail.rs:22:55
3   |
4LL | ...tatic [u8; 0], &'static [u16; 0]>();
5   |                   ^^^^^^^^^^^^^^^^^ The minimum alignment of `&[u8; 0]` (1) should be greater than that of `&[u16; 0]` (2)
6   |
7note: required by a bound in `is_maybe_transmutable`
8  --> $DIR/align-fail.rs:10:14
9   |
10LL |       pub fn is_maybe_transmutable<Src, Dst>()
11   |              --------------------- required by a bound in this function
12LL |       where
13LL |           Dst: BikeshedIntrinsicFrom<Src, Context, {
14   |  ______________^
15LL | |             Assume {
16LL | |                 alignment: false,
17LL | |                 lifetimes: true,
18...  |
19LL | |             }
20LL | |         }>
21   | |__________^ required by this bound in `is_maybe_transmutable`
22help: consider removing the leading `&`-reference
23   |
24LL -     assert::is_maybe_transmutable::<&'static [u8; 0], &'static [u16; 0]>();
25LL +     assert::is_maybe_transmutable::<&'static [u8; 0], [u16; 0]>();
26   |
27
28error: aborting due to previous error
29
30For more information about this error, try `rustc --explain E0277`.