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.

31 lines
1019 B
Plaintext
Raw Normal View History

2018-12-21 08:15:47 -06:00
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
2018-12-25 09:56:47 -06:00
--> $DIR/transmute-different-sizes.rs:11:17
2018-08-08 07:28:26 -05:00
|
LL | let _: i8 = transmute(16i16);
| ^^^^^^^^^
|
2018-12-21 08:15:47 -06:00
= note: source type: `i16` (N bits)
= note: target type: `i8` (N bits)
2018-08-08 07:28:26 -05:00
2018-12-21 08:15:47 -06:00
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
2018-12-25 09:56:47 -06:00
--> $DIR/transmute-different-sizes.rs:16:17
2018-08-08 07:28:26 -05:00
|
LL | let _: i8 = transmute(x);
| ^^^^^^^^^
|
2018-12-21 08:15:47 -06:00
= note: source type: `&T` (N bits)
= note: target type: `i8` (N bits)
2018-08-08 07:28:26 -05:00
2018-12-21 08:15:47 -06:00
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
2018-12-25 09:56:47 -06:00
--> $DIR/transmute-different-sizes.rs:27:5
2018-08-08 07:28:26 -05:00
|
LL | transmute(x)
| ^^^^^^^^^
|
2018-12-21 08:15:47 -06: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 07:28:26 -05:00
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0512`.