os-rust/tests/ui/transmute/transmute-different-sizes.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.7 KiB
Text
Raw Normal View History

2018-12-21 14:15:47 +00:00
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
2018-12-25 08:56:47 -07:00
--> $DIR/transmute-different-sizes.rs:11:17
2018-08-08 14:28:26 +02:00
|
LL | let _: i8 = transmute(16i16);
| ^^^^^^^^^
|
2018-12-21 14:15:47 +00:00
= note: source type: `i16` (N bits)
= note: target type: `i8` (N bits)
2018-08-08 14:28:26 +02:00
2018-12-21 14:15:47 +00:00
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
2018-12-25 08:56:47 -07:00
--> $DIR/transmute-different-sizes.rs:16:17
2018-08-08 14:28:26 +02:00
|
LL | let _: i8 = transmute(x);
| ^^^^^^^^^
|
2018-12-21 14:15:47 +00:00
= note: source type: `&T` (N bits)
= note: target type: `i8` (N bits)
2018-08-08 14:28:26 +02:00
2018-12-21 14:15:47 +00:00
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
2018-12-25 08:56:47 -07:00
--> $DIR/transmute-different-sizes.rs:27:5
2018-08-08 14:28:26 +02:00
|
LL | transmute(x)
| ^^^^^^^^^
|
2018-12-21 14:15:47 +00:00
= note: source type: `u16` (N bits)
= note: target type: `<T as Specializable>::Output` (this type does not have a fixed size)
2018-08-08 14:28:26 +02:00
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> $DIR/transmute-different-sizes.rs:38:5
|
LL | transmute(from)
| ^^^^^^^^^
|
= note: source type: `*mut T` (pointer to `T`)
= note: target type: `PtrAndOverAlignZST<T>` (size can vary because of <T as Pointee>::Metadata)
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> $DIR/transmute-different-sizes.rs:47:5
|
LL | std::mem::transmute(from)
| ^^^^^^^^^^^^^^^^^^^
|
= note: source type: `*mut T` (pointer to `T`)
= note: target type: `PtrAndEmptyArray<T>` (size can vary because of <T as Pointee>::Metadata)
error: aborting due to 5 previous errors
2018-08-08 14:28:26 +02:00
For more information about this error, try `rustc --explain E0512`.