mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 07:00:55 +00:00
add extra error message to the expected stderr for transmutes_expressible_as_ptr_casts test
This commit is contained in:
parent
94340d6e17
commit
ded2d6c233
1 changed files with 7 additions and 1 deletions
|
@ -46,5 +46,11 @@ error: transmute from `fn(usize) -> u8 {main::foo}` to `usize` which could be ex
|
||||||
LL | transmute::<fn(usize) -> u8, usize>(foo)
|
LL | transmute::<fn(usize) -> u8, usize>(foo)
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `foo as usize`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue