about summary refs log tree commit diff
path: root/tests/ui/packed-struct/packed-struct-transmute.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/packed-struct/packed-struct-transmute.stderr')
-rw-r--r--tests/ui/packed-struct/packed-struct-transmute.stderr12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/packed-struct/packed-struct-transmute.stderr b/tests/ui/packed-struct/packed-struct-transmute.stderr
new file mode 100644
index 00000000000..80a8919f77b
--- /dev/null
+++ b/tests/ui/packed-struct/packed-struct-transmute.stderr
@@ -0,0 +1,12 @@
+error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
+  --> $DIR/packed-struct-transmute.rs:26:24
+   |
+LL |         let oof: Oof = mem::transmute(foo);
+   |                        ^^^^^^^^^^^^^^
+   |
+   = note: source type: `Foo` (N bits)
+   = note: target type: `Oof` (N bits)
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0512`.