11error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
2- --> $DIR/transmute-fat-pointers.rs:10 :14
2+ --> $DIR/transmute-fat-pointers.rs:11 :14
33 |
44LL | unsafe { transmute(x) }
55 | ^^^^^^^^^
@@ -8,7 +8,7 @@ LL | unsafe { transmute(x) }
88 = note: target type: `&U` (pointer to `U`)
99
1010error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
11- --> $DIR/transmute-fat-pointers.rs:14 :14
11+ --> $DIR/transmute-fat-pointers.rs:15 :14
1212 |
1313LL | unsafe { transmute(x) }
1414 | ^^^^^^^^^
@@ -17,7 +17,7 @@ LL | unsafe { transmute(x) }
1717 = note: target type: `&U` (pointer to `U`)
1818
1919error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
20- --> $DIR/transmute-fat-pointers.rs:26 :14
20+ --> $DIR/transmute-fat-pointers.rs:27 :14
2121 |
2222LL | unsafe { transmute(x) }
2323 | ^^^^^^^^^
@@ -26,14 +26,23 @@ LL | unsafe { transmute(x) }
2626 = note: target type: `&U` (N bits)
2727
2828error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
29- --> $DIR/transmute-fat-pointers.rs:30 :14
29+ --> $DIR/transmute-fat-pointers.rs:31 :14
3030 |
3131LL | unsafe { transmute(x) }
3232 | ^^^^^^^^^
3333 |
3434 = note: source type: `&T` (N bits)
3535 = note: target type: `&U` (pointer to `U`)
3636
37- error: aborting due to 4 previous errors
37+ error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
38+ --> $DIR/transmute-fat-pointers.rs:46:14
39+ |
40+ LL | unsafe { transmute(x) }
41+ | ^^^^^^^^^
42+ |
43+ = note: source type: `Option<NonNull<T>>` (size can vary because of <T as Pointee>::Metadata)
44+ = note: target type: `NonNull<T>` (pointer to `T`)
45+
46+ error: aborting due to 5 previous errors
3847
3948For more information about this error, try `rustc --explain E0512`.
0 commit comments