|
1 | 1 | error[E0512]: transmute called with types of different sizes |
2 | | - --> $DIR/transmute-from-fn-item-types-error.rs:19:13 |
| 2 | + --> $DIR/transmute-from-fn-item-types-error.rs:14:13 |
3 | 3 | | |
4 | | -19 | let i = mem::transmute(bar); |
| 4 | +14 | let i = mem::transmute(bar); |
5 | 5 | | ^^^^^^^^^^^^^^ |
6 | 6 | | |
7 | 7 | = note: source type: unsafe fn() {bar} (0 bits) |
8 | | - = note: target type: i32 (32 bits) |
| 8 | + = note: target type: i8 (8 bits) |
9 | 9 |
|
10 | 10 | error[E0591]: can't transmute zero-sized type |
11 | | - --> $DIR/transmute-from-fn-item-types-error.rs:23:13 |
| 11 | + --> $DIR/transmute-from-fn-item-types-error.rs:18:13 |
12 | 12 | | |
13 | | -23 | let p = mem::transmute(foo); |
| 13 | +18 | let p = mem::transmute(foo); |
14 | 14 | | ^^^^^^^^^^^^^^ |
15 | 15 | | |
16 | | - = note: source type: unsafe fn() -> (i32, *const (), std::option::Option<fn()>) {foo} |
| 16 | + = note: source type: unsafe fn() -> (i8, *const (), std::option::Option<fn()>) {foo} |
17 | 17 | = note: target type: *const () |
18 | 18 | = help: cast with `as` to a pointer instead |
19 | 19 |
|
20 | 20 | error[E0591]: can't transmute zero-sized type |
21 | | - --> $DIR/transmute-from-fn-item-types-error.rs:27:14 |
| 21 | + --> $DIR/transmute-from-fn-item-types-error.rs:22:14 |
22 | 22 | | |
23 | | -27 | let of = mem::transmute(main); |
| 23 | +22 | let of = mem::transmute(main); |
24 | 24 | | ^^^^^^^^^^^^^^ |
25 | 25 | | |
26 | 26 | = note: source type: fn() {main} |
27 | 27 | = note: target type: std::option::Option<fn()> |
28 | 28 | = help: cast with `as` to a pointer instead |
29 | 29 |
|
30 | 30 | error[E0512]: transmute called with types of different sizes |
31 | | - --> $DIR/transmute-from-fn-item-types-error.rs:36:5 |
| 31 | + --> $DIR/transmute-from-fn-item-types-error.rs:31:5 |
32 | 32 | | |
33 | | -36 | mem::transmute::<_, u8>(main); |
| 33 | +31 | mem::transmute::<_, u8>(main); |
34 | 34 | | ^^^^^^^^^^^^^^^^^^^^^^^ |
35 | 35 | | |
36 | 36 | = note: source type: fn() {main} (0 bits) |
37 | 37 | = note: target type: u8 (8 bits) |
38 | 38 |
|
39 | 39 | error[E0591]: can't transmute zero-sized type |
40 | | - --> $DIR/transmute-from-fn-item-types-error.rs:40:5 |
| 40 | + --> $DIR/transmute-from-fn-item-types-error.rs:35:5 |
41 | 41 | | |
42 | | -40 | mem::transmute::<_, *mut ()>(foo); |
| 42 | +35 | mem::transmute::<_, *mut ()>(foo); |
43 | 43 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
44 | 44 | | |
45 | | - = note: source type: unsafe fn() -> (i32, *const (), std::option::Option<fn()>) {foo} |
| 45 | + = note: source type: unsafe fn() -> (i8, *const (), std::option::Option<fn()>) {foo} |
46 | 46 | = note: target type: *mut () |
47 | 47 | = help: cast with `as` to a pointer instead |
48 | 48 |
|
49 | 49 | error[E0591]: can't transmute zero-sized type |
50 | | - --> $DIR/transmute-from-fn-item-types-error.rs:44:5 |
| 50 | + --> $DIR/transmute-from-fn-item-types-error.rs:39:5 |
51 | 51 | | |
52 | | -44 | mem::transmute::<_, fn()>(bar); |
| 52 | +39 | mem::transmute::<_, fn()>(bar); |
53 | 53 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
54 | 54 | | |
55 | 55 | = note: source type: unsafe fn() {bar} |
56 | 56 | = note: target type: fn() |
57 | 57 | = help: cast with `as` to a pointer instead |
58 | 58 |
|
59 | | -error[E0512]: transmute called with types of different sizes |
60 | | - --> $DIR/transmute-from-fn-item-types-error.rs:49:5 |
61 | | - | |
62 | | -49 | mem::transmute::<fn(), u32>(main); |
63 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
64 | | - | |
65 | | - = note: source type: fn() (64 bits) |
66 | | - = note: target type: u32 (32 bits) |
67 | | - |
68 | 59 | error[E0591]: can't transmute zero-sized type |
69 | | - --> $DIR/transmute-from-fn-item-types-error.rs:53:5 |
| 60 | + --> $DIR/transmute-from-fn-item-types-error.rs:48:5 |
70 | 61 | | |
71 | | -53 | mem::transmute::<_, *mut ()>(Some(foo)); |
| 62 | +48 | mem::transmute::<_, *mut ()>(Some(foo)); |
72 | 63 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
73 | 64 | | |
74 | | - = note: source type: unsafe fn() -> (i32, *const (), std::option::Option<fn()>) {foo} |
| 65 | + = note: source type: unsafe fn() -> (i8, *const (), std::option::Option<fn()>) {foo} |
75 | 66 | = note: target type: *mut () |
76 | 67 | = help: cast with `as` to a pointer instead |
77 | 68 |
|
78 | 69 | error[E0591]: can't transmute zero-sized type |
79 | | - --> $DIR/transmute-from-fn-item-types-error.rs:57:5 |
| 70 | + --> $DIR/transmute-from-fn-item-types-error.rs:52:5 |
80 | 71 | | |
81 | | -57 | mem::transmute::<_, fn()>(Some(bar)); |
| 72 | +52 | mem::transmute::<_, fn()>(Some(bar)); |
82 | 73 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
83 | 74 | | |
84 | 75 | = note: source type: unsafe fn() {bar} |
85 | 76 | = note: target type: fn() |
86 | 77 | = help: cast with `as` to a pointer instead |
87 | 78 |
|
88 | 79 | error[E0591]: can't transmute zero-sized type |
89 | | - --> $DIR/transmute-from-fn-item-types-error.rs:61:5 |
| 80 | + --> $DIR/transmute-from-fn-item-types-error.rs:56:5 |
90 | 81 | | |
91 | | -61 | mem::transmute::<_, Option<fn()>>(Some(baz)); |
| 82 | +56 | mem::transmute::<_, Option<fn()>>(Some(baz)); |
92 | 83 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
93 | 84 | | |
94 | 85 | = note: source type: unsafe fn() {baz} |
95 | 86 | = note: target type: std::option::Option<fn()> |
96 | 87 | = help: cast with `as` to a pointer instead |
97 | 88 |
|
98 | | -error[E0512]: transmute called with types of different sizes |
99 | | - --> $DIR/transmute-from-fn-item-types-error.rs:66:5 |
100 | | - | |
101 | | -66 | mem::transmute::<Option<fn()>, u32>(Some(main)); |
102 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
103 | | - | |
104 | | - = note: source type: std::option::Option<fn()> (64 bits) |
105 | | - = note: target type: u32 (32 bits) |
106 | | - |
107 | | -error: aborting due to 11 previous errors |
| 89 | +error: aborting due to 9 previous errors |
108 | 90 |
|
0 commit comments