From ded2d6c23389aa1db753b5093947f66cea81deef Mon Sep 17 00:00:00 2001 From: Ryan1729 Date: Wed, 5 Aug 2020 21:28:22 -0600 Subject: [PATCH] add extra error message to the expected stderr for transmutes_expressible_as_ptr_casts test --- tests/ui/transmutes_expressible_as_ptr_casts.stderr | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/ui/transmutes_expressible_as_ptr_casts.stderr b/tests/ui/transmutes_expressible_as_ptr_casts.stderr index 7cd316bf3..e6edacbd0 100644 --- a/tests/ui/transmutes_expressible_as_ptr_casts.stderr +++ b/tests/ui/transmutes_expressible_as_ptr_casts.stderr @@ -46,5 +46,11 @@ error: transmute from `fn(usize) -> u8 {main::foo}` to `usize` which could be ex LL | transmute:: u8, usize>(foo) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `foo as usize` -error: aborting due to 7 previous errors +error: transmute from a reference to a pointer + --> $DIR/transmutes_expressible_as_ptr_casts.rs:75:14 + | +LL | unsafe { transmute::<&[i32; 1], *const u8>(in_param) } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `in_param as *const [i32; 1] as *const u8` + +error: aborting due to 8 previous errors