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