1 #![warn(clippy::unsafe_derive_deserialize)]
2 #![allow(unused, clippy::missing_safety_doc)]
6 use serde::Deserialize;
11 pub unsafe fn new(_a: i32, _b: i32) -> Self {
16 #[derive(Deserialize)]
19 pub unsafe fn unsafe_method(&self) {}
22 #[derive(Deserialize)]
25 pub fn unsafe_block(&self) {
30 #[derive(Deserialize)]
33 pub fn inner_unsafe_fn(&self) {
38 // Does not derive `Deserialize`, should be ignored
41 pub unsafe fn new(_a: i32, _b: i32) -> Self {
45 pub unsafe fn unsafe_method(&self) {}
47 pub fn unsafe_block(&self) {
51 pub fn inner_unsafe_fn(&self) {
56 // Does not have methods using `unsafe`, should be ignored
57 #[derive(Deserialize)]
60 // Check that we honor the `allow` attribute on the ADT
61 #[allow(clippy::unsafe_derive_deserialize)]
62 #[derive(Deserialize)]
65 pub fn unsafe_block(&self) {