Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unnecessary_cast for u8 as c_char on some platforms #6331

Closed
glandium opened this issue Nov 14, 2020 · 0 comments · Fixed by #6369
Closed

unnecessary_cast for u8 as c_char on some platforms #6331

glandium opened this issue Nov 14, 2020 · 0 comments · Fixed by #6369

Comments

@glandium
Copy link

On many platforms, c_char is an alias for i8. On some others, though, it's u8.

So when you have code like

const FOO: std::os::raw::c_char = b'f' as std::os::raw::c_char; 

which is necessary on those many platforms, clippy complains when run on one of those other platforms (e.g. aarch64 linux).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant