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

New lint: casting &mut T to &mut MaybeUninit<T> and exposing it as safe #4896

Open
Kixunil opened this issue Dec 11, 2019 · 1 comment
Open
Labels
A-lint Area: New lints E-medium Call for participation: Medium difficulty level problem and requires some initial experience. L-correctness Lint: Belongs in the correctness lint group

Comments

@Kixunil
Copy link

Kixunil commented Dec 11, 2019

As discussed at several different places, the pattern of casting &mut T to &mut MaybeUninit<T> or &mut [T] to &mut [MaybeUninit<T>] and exposing it as safe is reoccurring (see bellow), so making Correctness lint would help.

IDK if there's any policy about clippy suggesting particular crates, but if this is allowed, maybe suggest possibly_uninit.

@Manishearth
Copy link
Member

Yeah, we should definitely suggest a crate for this.

@flip1995 flip1995 added L-correctness Lint: Belongs in the correctness lint group E-medium Call for participation: Medium difficulty level problem and requires some initial experience. A-lint Area: New lints labels Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: New lints E-medium Call for participation: Medium difficulty level problem and requires some initial experience. L-correctness Lint: Belongs in the correctness lint group
Projects
None yet
Development

No branches or pull requests

3 participants