rust-clippy icon indicating copy to clipboard operation
rust-clippy copied to clipboard

`transmute_undefined_repr` fix

Open Jarcho opened this issue 2 years ago • 3 comments

changelog: Don't lint transmute_undefined_repr when the the first field of a repr(C) type is compatible with the other type

Jarcho avatar Aug 03 '22 17:08 Jarcho

r? @xFrednet

(rust-highfive has picked a reviewer for you, use r? to override)

rust-highfive avatar Aug 03 '22 17:08 rust-highfive

Could you have a look at the CI? Then we can merge this :)

xFrednet avatar Aug 05 '22 13:08 xFrednet

The most recent change allows casts between *const/mut int_type and any type as a form of type erasure. *u8/i8 are used as an untyped buffer. I've also seen *u16/i16 used due to windows api's counting by them.

Jarcho avatar Aug 08 '22 00:08 Jarcho

Looks good to me, thank you for the update!

@bors r+

xFrednet avatar Aug 17 '22 13:08 xFrednet

:pushpin: Commit 99e77d07b2856fccd083d5810a9756e07cc4c524 has been approved by xFrednet

It is now in the queue for this repository.

bors avatar Aug 17 '22 13:08 bors

:hourglass: Testing commit 99e77d07b2856fccd083d5810a9756e07cc4c524 with merge 84fb7e039565ac87f504af235940a568b90e7223...

bors avatar Aug 17 '22 13:08 bors

:sunny: Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test Approved by: xFrednet Pushing 84fb7e039565ac87f504af235940a568b90e7223 to master...

bors avatar Aug 17 '22 13:08 bors