Skip to content

Commit afd4909

Browse files
committed
add extra error message to the expected stderr for transmutes_expressible_as_ptr_casts test
1 parent 8ba4101 commit afd4909

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/tools/clippy/tests/ui/transmutes_expressible_as_ptr_casts.stderr

+7-1
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,11 @@ error: transmute from `fn(usize) -> u8 {main::foo}` to `usize` which could be ex
4646
LL | transmute::<fn(usize) -> u8, usize>(foo)
4747
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `foo as usize`
4848

49-
error: aborting due to 7 previous errors
49+
error: transmute from a reference to a pointer
50+
--> $DIR/transmutes_expressible_as_ptr_casts.rs:75:14
51+
|
52+
LL | unsafe { transmute::<&[i32; 1], *const u8>(in_param) }
53+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `in_param as *const [i32; 1] as *const u8`
54+
55+
error: aborting due to 8 previous errors
5056

0 commit comments

Comments
 (0)