|
1 | 1 | error: transmute from `Ty2<u32, i32>` which has an undefined layout |
2 | | - --> $DIR/transmute_undefined_repr.rs:26:33 |
| 2 | + --> $DIR/transmute_undefined_repr.rs:27:33 |
3 | 3 | | |
4 | 4 | LL | let _: Ty2C<u32, i32> = transmute(value::<Ty2<u32, i32>>()); // Lint, Ty2 is unordered |
5 | 5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
6 | 6 | | |
7 | 7 | = note: `-D clippy::transmute-undefined-repr` implied by `-D warnings` |
8 | 8 |
|
9 | 9 | error: transmute into `Ty2<u32, i32>` which has an undefined layout |
10 | | - --> $DIR/transmute_undefined_repr.rs:27:32 |
| 10 | + --> $DIR/transmute_undefined_repr.rs:28:32 |
11 | 11 | | |
12 | 12 | LL | let _: Ty2<u32, i32> = transmute(value::<Ty2C<u32, i32>>()); // Lint, Ty2 is unordered |
13 | 13 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
14 | 14 |
|
15 | 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:32:32 |
| 16 | + --> $DIR/transmute_undefined_repr.rs:33:32 |
17 | 17 | | |
18 | 18 | LL | let _: Ty2<u32, f32> = transmute(value::<Ty<Ty2<u32, i32>>>()); // Lint, different Ty2 instances |
19 | 19 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
20 | 20 | | |
21 | 21 | = note: two instances of the same generic type (`Ty2`) may have different layouts |
22 | 22 |
|
23 | 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:33:36 |
| 24 | + --> $DIR/transmute_undefined_repr.rs:34:36 |
25 | 25 | | |
26 | 26 | LL | let _: Ty<Ty2<u32, i32>> = transmute(value::<Ty2<u32, f32>>()); // Lint, different Ty2 instances |
27 | 27 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
28 | 28 | | |
29 | 29 | = note: two instances of the same generic type (`Ty2`) may have different layouts |
30 | 30 |
|
31 | 31 | error: transmute from `Ty<&Ty2<u32, i32>>` to `&Ty2<u32, f32>`, both of which have an undefined layout |
32 | | - --> $DIR/transmute_undefined_repr.rs:38:33 |
| 32 | + --> $DIR/transmute_undefined_repr.rs:39:33 |
33 | 33 | | |
34 | 34 | LL | let _: &Ty2<u32, f32> = transmute(value::<Ty<&Ty2<u32, i32>>>()); // Lint, different Ty2 instances |
35 | 35 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
36 | 36 | | |
37 | 37 | = note: two instances of the same generic type (`Ty2`) may have different layouts |
38 | 38 |
|
39 | 39 | error: transmute from `&Ty2<u32, f32>` to `Ty<&Ty2<u32, i32>>`, both of which have an undefined layout |
40 | | - --> $DIR/transmute_undefined_repr.rs:39:37 |
| 40 | + --> $DIR/transmute_undefined_repr.rs:40:37 |
41 | 41 | | |
42 | 42 | LL | let _: Ty<&Ty2<u32, i32>> = transmute(value::<&Ty2<u32, f32>>()); // Lint, different Ty2 instances |
43 | 43 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
44 | 44 | | |
45 | 45 | = note: two instances of the same generic type (`Ty2`) may have different layouts |
46 | 46 |
|
47 | 47 | error: transmute from `std::boxed::Box<Ty2<u32, u32>>` to `&mut Ty2<u32, f32>`, both of which have an undefined layout |
48 | | - --> $DIR/transmute_undefined_repr.rs:56:45 |
| 48 | + --> $DIR/transmute_undefined_repr.rs:57:45 |
49 | 49 | | |
50 | 50 | LL | let _: &'static mut Ty2<u32, f32> = transmute(value::<Box<Ty2<u32, u32>>>()); // Lint, different Ty2 instances |
51 | 51 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
52 | 52 | | |
53 | 53 | = note: two instances of the same generic type (`Ty2`) may have different layouts |
54 | 54 |
|
55 | 55 | error: transmute from `&mut Ty2<u32, f32>` to `std::boxed::Box<Ty2<u32, u32>>`, both of which have an undefined layout |
56 | | - --> $DIR/transmute_undefined_repr.rs:57:37 |
| 56 | + --> $DIR/transmute_undefined_repr.rs:58:37 |
57 | 57 | | |
58 | 58 | LL | let _: Box<Ty2<u32, u32>> = transmute(value::<&'static mut Ty2<u32, f32>>()); // Lint, different Ty2 instances |
59 | 59 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
60 | 60 | | |
61 | 61 | = note: two instances of the same generic type (`Ty2`) may have different layouts |
62 | 62 |
|
63 | | -error: aborting due to 8 previous errors |
| 63 | +error: transmute from `std::vec::Vec<Ty2<U, i32>>` to `std::vec::Vec<Ty2<T, u32>>`, both of which have an undefined layout |
| 64 | + --> $DIR/transmute_undefined_repr.rs:138:35 |
| 65 | + | |
| 66 | +LL | let _: Vec<Ty2<T, u32>> = transmute(value::<Vec<Ty2<U, i32>>>()); // Err |
| 67 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 68 | + | |
| 69 | + = note: two instances of the same generic type (`Vec`) may have different layouts |
| 70 | + |
| 71 | +error: transmute from `std::vec::Vec<Ty2<T, u32>>` to `std::vec::Vec<Ty2<U, i32>>`, both of which have an undefined layout |
| 72 | + --> $DIR/transmute_undefined_repr.rs:139:35 |
| 73 | + | |
| 74 | +LL | let _: Vec<Ty2<U, i32>> = transmute(value::<Vec<Ty2<T, u32>>>()); // Err |
| 75 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 76 | + | |
| 77 | + = note: two instances of the same generic type (`Vec`) may have different layouts |
| 78 | + |
| 79 | +error: aborting due to 10 previous errors |
64 | 80 |
|
0 commit comments