#rustlang peeps, c_char has different signedness on x86_64 vs. aarch64 (i8 vs. u8).

Do you get frequent shit like

returns_a_c_str().to_ptr() as *const _

with a warning about a trivial cast, on either platform? Short of disabling the "trivial casts" warning, is there a good way of fixing that portably?

@federicomena perhaps use actual into conversions. I never got that though, so yeah, not much to add unfortunately

@federicomena The .cast() method on pointers doesn't seem to trigger the lint. It also comes with the added bonus that it can't accidentally cast *const into *mut.

https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=2a1d091a7bb85e39ffc0836e2465d392

Rust Playground

A browser interface to the Rust compiler to experiment with the language

@TDplay ooh, thank you! I'll try that!