mirror of
https://github.com/serde-rs/serde.git
synced 2025-09-27 04:50:36 +00:00

Allow deprecated in the `Serialize`/`Deserialize` derive implementations. This allows you to deprecate structs, enums, struct fields, or enum variants and not get compiler warnings/errors about use of deprecated thing. We only do this if `#[deprecated]` or `#[allow(deprecated)]` exist on the root object or the variants of the root object (if it is an enum). Resolves #2195
12 lines
358 B
Plaintext
12 lines
358 B
Plaintext
error: use of deprecated function `deprecated_with`
|
|
--> tests/ui/deprecated/deprecated_ser_with.rs:8:30
|
|
|
|
|
8 | #[serde(serialize_with = "deprecated_with")]
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
note: the lint level is defined here
|
|
--> tests/ui/deprecated/deprecated_ser_with.rs:1:9
|
|
|
|
|
1 | #![deny(deprecated)]
|
|
| ^^^^^^^^^^
|