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

Implement unsafe_derive_deserialize lint #5493

Merged
merged 2 commits into from
Apr 20, 2020

Conversation

ebroto
Copy link
Member

@ebroto ebroto commented Apr 19, 2020

Added unsafe_derive_deserialize lint to check for cases when automatically deriving serde::Deserialize can be problematic, i.e. with types that have methods using unsafe.

Closes #5471

changelog: Add lint [unsafe_derive_deserialize]

clippy_lints/src/derive.rs Outdated Show resolved Hide resolved
clippy_lints/src/derive.rs Outdated Show resolved Hide resolved
* Move the lint to pedantic
* Import used types instead of prefixing with `hir::`
@flip1995
Copy link
Member

@bors r+

Thanks!

@bors
Copy link
Collaborator

bors commented Apr 20, 2020

📌 Commit b7f85e8 has been approved by flip1995

@bors
Copy link
Collaborator

bors commented Apr 20, 2020

⌛ Testing commit b7f85e8 with merge 1336558...

@bors
Copy link
Collaborator

bors commented Apr 20, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing 1336558 to master...

@bors bors merged commit 1336558 into rust-lang:master Apr 20, 2020
@ebroto ebroto deleted the unsafe_derive_deserialize branch April 20, 2020 18:51
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 this pull request may close these issues.

Suggestion: Detect derive(Deserialize) on type that has methods using unsafe
3 participants