]> git.lizzy.rs Git - rust.git/blob - tests/ui/transmute_undefined_repr.stderr
Auto merge of #8374 - Alexendoo:bless-revisions, r=camsteffen
[rust.git] / tests / ui / transmute_undefined_repr.stderr
1 error: transmute from `Ty2<u32, i32>` which has an undefined layout
2   --> $DIR/transmute_undefined_repr.rs:23:33
3    |
4 LL |         let _: Ty2C<u32, i32> = core::mem::transmute(value::<Ty2<u32, i32>>()); // Lint, Ty2 is unordered
5    |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: `-D clippy::transmute-undefined-repr` implied by `-D warnings`
8
9 error: transmute into `Ty2<u32, i32>` which has an undefined layout
10   --> $DIR/transmute_undefined_repr.rs:24:32
11    |
12 LL |         let _: Ty2<u32, i32> = core::mem::transmute(value::<Ty2C<u32, i32>>()); // Lint, Ty2 is unordered
13    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14
15 error: transmute from `Ty<Ty2<u32, i32>>` to `Ty2<u32, f32>`, both of which have an undefined layout
16   --> $DIR/transmute_undefined_repr.rs:29:32
17    |
18 LL |         let _: Ty2<u32, f32> = core::mem::transmute(value::<Ty<Ty2<u32, i32>>>()); // Lint, different Ty2 instances
19    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20    |
21    = note: two instances of the same generic type (`Ty2`) may have different layouts
22
23 error: transmute from `Ty2<u32, f32>` to `Ty<Ty2<u32, i32>>`, both of which have an undefined layout
24   --> $DIR/transmute_undefined_repr.rs:30:36
25    |
26 LL |         let _: Ty<Ty2<u32, i32>> = core::mem::transmute(value::<Ty2<u32, f32>>()); // Lint, different Ty2 instances
27    |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28    |
29    = note: two instances of the same generic type (`Ty2`) may have different layouts
30
31 error: transmute to `&Ty2<u32, f32>` which has an undefined layout
32   --> $DIR/transmute_undefined_repr.rs:35:33
33    |
34 LL |         let _: &Ty2<u32, f32> = core::mem::transmute(value::<Ty<&Ty2<u32, i32>>>()); // Lint, different Ty2 instances
35    |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36
37 error: transmute from `&Ty2<u32, f32>` which has an undefined layout
38   --> $DIR/transmute_undefined_repr.rs:36:37
39    |
40 LL |         let _: Ty<&Ty2<u32, i32>> = core::mem::transmute(value::<&Ty2<u32, f32>>()); // Lint, different Ty2 instances
41    |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42
43 error: aborting due to 6 previous errors
44