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

Improve explanation of not_unsafe_ptr_arg_deref #7714

Closed
Tracked by #79
dtolnay opened this issue Sep 24, 2021 · 1 comment · Fixed by #10116
Closed
Tracked by #79

Improve explanation of not_unsafe_ptr_arg_deref #7714

dtolnay opened this issue Sep 24, 2021 · 1 comment · Fixed by #10116

Comments

@dtolnay
Copy link
Member

dtolnay commented Sep 24, 2021

I pointed out in #7666 (comment) that the use of allow(clippy::not_unsafe_ptr_arg_deref) on crates.io is shockingly high.

Here is the list: https://dtolnay.github.io/noisy-clippy/not_unsafe_ptr_arg_deref.html

I spot checked some of these and pretty much every case is unsound.

If people are not understanding what this lint is attempting to tell them, it seems like the lint isn't doing its job. We should look into whether the lint's documentation or the lint's diagnostic output can be improved in a way that better comes across to people. It may be worth looping in some of the maintainers of some of the crates above about what might have been helpful for them to understand the lint.

@tgross35
Copy link
Contributor

Opened #10116 with stronger wording & context

Has uplifting this lint to rustc ever been considered? It seems important enough to be considered (I'm not sure what the criteria are for that)

@bors bors closed this as completed in 4f1bae0 Dec 25, 2022
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.

2 participants