forked from serde-rs/serde
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fork Sync: Update from parent repository #64
Open
github-actions
wants to merge
324
commits into
ComunidadAylas:master
Choose a base branch
from
serde-rs:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
warning: bound is defined in more than one place --> serde/src/ser/fmt.rs:77:33 | 77 | fn serialize_newtype_struct<T: ?Sized>(self, _name: &'static str, value: &T) -> fmt::Result | ^ 78 | where 79 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations = note: `-W clippy::multiple-bound-locations` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::multiple_bound_locations)]` warning: bound is defined in more than one place --> serde/src/ser/fmt.rs:92:23 | 92 | fn serialize_some<T: ?Sized>(self, _value: &T) -> fmt::Result | ^ 93 | where 94 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/fmt.rs:103:34 | 103 | fn serialize_newtype_variant<T: ?Sized>( | ^ ... 111 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/fmt.rs:164:20 | 164 | fn collect_str<T: ?Sized>(self, value: &T) -> fmt::Result | ^ 165 | where 166 | T: Display, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/impossible.rs:75:26 | 75 | fn serialize_element<T: ?Sized>(&mut self, value: &T) -> Result<(), Error> | ^ 76 | where 77 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/impossible.rs:95:26 | 95 | fn serialize_element<T: ?Sized>(&mut self, value: &T) -> Result<(), Error> | ^ 96 | where 97 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/impossible.rs:115:24 | 115 | fn serialize_field<T: ?Sized>(&mut self, value: &T) -> Result<(), Error> | ^ 116 | where 117 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/impossible.rs:135:24 | 135 | fn serialize_field<T: ?Sized>(&mut self, value: &T) -> Result<(), Error> | ^ 136 | where 137 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/impossible.rs:155:22 | 155 | fn serialize_key<T: ?Sized>(&mut self, key: &T) -> Result<(), Error> | ^ 156 | where 157 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/impossible.rs:163:24 | 163 | fn serialize_value<T: ?Sized>(&mut self, value: &T) -> Result<(), Error> | ^ 164 | where 165 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/impossible.rs:183:24 | 183 | fn serialize_field<T: ?Sized>(&mut self, key: &'static str, value: &T) -> Result<(), Error> | ^ 184 | where 185 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/impossible.rs:204:24 | 204 | fn serialize_field<T: ?Sized>(&mut self, key: &'static str, value: &T) -> Result<(), Error> | ^ 205 | where 206 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/mod.rs:799:23 | 799 | fn serialize_some<T: ?Sized>(self, value: &T) -> Result<Self::Ok, Self::Error> | ^ 800 | where 801 | T: Serialize; | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/mod.rs:894:33 | 894 | fn serialize_newtype_struct<T: ?Sized>( | ^ ... 900 | T: Serialize; | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/mod.rs:928:34 | 928 | fn serialize_newtype_variant<T: ?Sized>( | ^ ... 936 | T: Serialize; | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/mod.rs:1349:20 | 1349 | fn collect_str<T: ?Sized>(self, value: &T) -> Result<Self::Ok, Self::Error> | ^ 1350 | where 1351 | T: Display, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/mod.rs:1496:26 | 1496 | fn serialize_element<T: ?Sized>(&mut self, value: &T) -> Result<(), Self::Error> | ^ 1497 | where 1498 | T: Serialize; | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/mod.rs:1596:26 | 1596 | fn serialize_element<T: ?Sized>(&mut self, value: &T) -> Result<(), Self::Error> | ^ 1597 | where 1598 | T: Serialize; | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/mod.rs:1641:24 | 1641 | fn serialize_field<T: ?Sized>(&mut self, value: &T) -> Result<(), Self::Error> | ^ 1642 | where 1643 | T: Serialize; | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/mod.rs:1699:24 | 1699 | fn serialize_field<T: ?Sized>(&mut self, value: &T) -> Result<(), Self::Error> | ^ 1700 | where 1701 | T: Serialize; | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/mod.rs:1770:22 | 1770 | fn serialize_key<T: ?Sized>(&mut self, key: &T) -> Result<(), Self::Error> | ^ 1771 | where 1772 | T: Serialize; | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/mod.rs:1780:24 | 1780 | fn serialize_value<T: ?Sized>(&mut self, value: &T) -> Result<(), Self::Error> | ^ 1781 | where 1782 | T: Serialize; | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/mod.rs:1801:24 | 1801 | fn serialize_entry<K: ?Sized, V: ?Sized>( | ^ ... 1807 | K: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/mod.rs:1801:35 | 1801 | fn serialize_entry<K: ?Sized, V: ?Sized>( | ^ ... 1808 | V: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/mod.rs:1859:24 | 1859 | fn serialize_field<T: ?Sized>( | ^ ... 1865 | T: Serialize; | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/ser/mod.rs:1925:24 | 1925 | fn serialize_field<T: ?Sized>( | ^ ... 1931 | T: Serialize; | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:177:23 | 177 | fn serialize_some<T: ?Sized>(self, _: &T) -> Result<Self::Ok, Self::Error> | ^ 178 | where 179 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:208:33 | 208 | fn serialize_newtype_struct<T: ?Sized>( | ^ ... 214 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:219:34 | 219 | fn serialize_newtype_variant<T: ?Sized>( | ^ ... 227 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:367:28 | 367 | fn serialize_field<T: ?Sized>(&mut self, value: &T) -> Result<(), M::Error> | ^ 368 | where 369 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:407:28 | 407 | fn serialize_field<T: ?Sized>( | ^ ... 413 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:638:27 | 638 | fn serialize_some<T: ?Sized>(self, value: &T) -> Result<Content, E> | ^ 639 | where 640 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:662:37 | 662 | fn serialize_newtype_struct<T: ?Sized>( | ^ ... 668 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:676:38 | 676 | fn serialize_newtype_variant<T: ?Sized>( | ^ ... 684 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:785:30 | 785 | fn serialize_element<T: ?Sized>(&mut self, value: &T) -> Result<(), E> | ^ 786 | where 787 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:811:30 | 811 | fn serialize_element<T: ?Sized>(&mut self, value: &T) -> Result<(), E> | ^ 812 | where 813 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:838:28 | 838 | fn serialize_field<T: ?Sized>(&mut self, value: &T) -> Result<(), E> | ^ 839 | where 840 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:867:28 | 867 | fn serialize_field<T: ?Sized>(&mut self, value: &T) -> Result<(), E> | ^ 868 | where 869 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:899:26 | 899 | fn serialize_key<T: ?Sized>(&mut self, key: &T) -> Result<(), E> | ^ 900 | where 901 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:908:28 | 908 | fn serialize_value<T: ?Sized>(&mut self, value: &T) -> Result<(), E> | ^ 909 | where 910 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:925:28 | 925 | fn serialize_entry<K: ?Sized, V: ?Sized>(&mut self, key: &K, value: &V) -> Result<(), E> | ^ 926 | where 927 | K: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:925:39 | 925 | fn serialize_entry<K: ?Sized, V: ?Sized>(&mut self, key: &K, value: &V) -> Result<(), E> | ^ ... 928 | V: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:950:28 | 950 | fn serialize_field<T: ?Sized>(&mut self, key: &'static str, value: &T) -> Result<(), E> | ^ 951 | where 952 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:979:28 | 979 | fn serialize_field<T: ?Sized>(&mut self, key: &'static str, value: &T) -> Result<(), E> | ^ 980 | where 981 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:1091:23 | 1091 | fn serialize_some<T: ?Sized>(self, value: &T) -> Result<Self::Ok, Self::Error> | ^ 1092 | where 1093 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:1115:33 | 1115 | fn serialize_newtype_struct<T: ?Sized>( | ^ ... 1121 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:1126:34 | 1126 | fn serialize_newtype_variant<T: ?Sized>( | ^ ... 1134 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:1205:22 | 1205 | fn serialize_key<T: ?Sized>(&mut self, key: &T) -> Result<(), Self::Error> | ^ 1206 | where 1207 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:1212:24 | 1212 | fn serialize_value<T: ?Sized>(&mut self, value: &T) -> Result<(), Self::Error> | ^ 1213 | where 1214 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:1219:24 | 1219 | fn serialize_entry<K: ?Sized, V: ?Sized>( | ^ ... 1225 | K: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:1219:35 | 1219 | fn serialize_entry<K: ?Sized, V: ?Sized>( | ^ ... 1226 | V: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:1247:24 | 1247 | fn serialize_field<T: ?Sized>( | ^ ... 1253 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:1292:24 | 1292 | fn serialize_field<T: ?Sized>(&mut self, value: &T) -> Result<(), Self::Error> | ^ 1293 | where 1294 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations warning: bound is defined in more than one place --> serde/src/private/ser.rs:1338:24 | 1338 | fn serialize_field<T: ?Sized>( | ^ ... 1344 | T: Serialize, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
These impls have both `T: ?Sized` and `T: Deserialize<'de>`. But `Deserialize<'de>: Sized`.
Since nightly-2024-03-12. warning: struct `PackedC` is never constructed --> test_suite/tests/test_macros.rs:2237:12 | 2237 | struct PackedC { | ^^^^^^^ | = note: `#[warn(dead_code)]` on by default warning: struct `CPacked` is never constructed --> test_suite/tests/test_macros.rs:2243:12 | 2243 | struct CPacked { | ^^^^^^^ warning: struct `CPacked2` is never constructed --> test_suite/tests/test_macros.rs:2249:12 | 2249 | struct CPacked2 { | ^^^^^^^^ warning: struct `Packed2C` is never constructed --> test_suite/tests/test_macros.rs:2255:12 | 2255 | struct Packed2C { | ^^^^^^^^ error: struct `Packed` is never constructed --> test_suite/tests/test_gen.rs:733:12 | 733 | struct Packed { | ^^^^^^ | note: the lint level is defined here --> test_suite/tests/test_gen.rs:5:9 | 5 | #![deny(warnings)] | ^^^^^^^^ = note: `#[deny(dead_code)]` implied by `#[deny(warnings)]` error: struct `Struct` is never constructed --> test_suite/tests/test_gen.rs:764:12 | 764 | struct Struct { | ^^^^^^ error: function `vec_first_element` is never used --> test_suite/tests/test_gen.rs:846:4 | 846 | fn vec_first_element<T, S>(vec: &[T], serializer: S) -> StdResult<S::Ok, S::Error> | ^^^^^^^^^^^^^^^^^
New warning since nightly-2024-03-03: warning: serde_derive/Cargo.toml: no edition set: defaulting to the 2015 edition while 2018 is compatible with `rust-version` warning: serde_derive_internals/Cargo.toml: no edition set: defaulting to the 2015 edition while 2018 is compatible with `rust-version`
Document that `len` does not include skipped struct fields
New in nightly-2024-03-24 from rust-lang/rust#119552. warning: fields `nested` and `string` are never read --> test_suite/tests/regression/issue2371.rs:10:9 | 8 | Flatten { | ------- fields in this variant 9 | #[serde(flatten)] 10 | nested: Nested, | ^^^^^^ 11 | string: &'static str, | ^^^^^^ | = note: `#[warn(dead_code)]` on by default warning: fields `nested` and `string` are never read --> test_suite/tests/regression/issue2371.rs:20:9 | 18 | Flatten { | ------- fields in this variant 19 | #[serde(flatten)] 20 | nested: Nested, | ^^^^^^ 21 | string: &'static str, | ^^^^^^ warning: fields `nested` and `string` are never read --> test_suite/tests/regression/issue2371.rs:30:9 | 28 | Flatten { | ------- fields in this variant 29 | #[serde(flatten)] 30 | nested: Nested, | ^^^^^^ 31 | string: &'static str, | ^^^^^^ warning: fields `nested` and `string` are never read --> test_suite/tests/regression/issue2371.rs:40:9 | 38 | Flatten { | ------- fields in this variant 39 | #[serde(flatten)] 40 | nested: Nested, | ^^^^^^ 41 | string: &'static str, | ^^^^^^ warning: field `0` is never read --> test_suite/tests/test_gen.rs:690:33 | 690 | Single(#[serde(borrow)] RelObject<'a>), | ------ ^^^^^^^^^^^^^ | | | field in this variant | = note: `#[warn(dead_code)]` on by default help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 690 | Single(#[serde(borrow)] ()), | ~~ warning: field `0` is never read --> test_suite/tests/test_gen.rs:691:31 | 691 | Many(#[serde(borrow)] Vec<RelObject<'a>>), | ---- ^^^^^^^^^^^^^^^^^^ | | | field in this variant | help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 691 | Many(#[serde(borrow)] ()), | ~~
Debugging a recent cargo-outdated bug, it would have been nice not to wonder whether a rustc version change in GitHub's runner image was a contributing factor.
warning: usage of a legacy numeric method --> serde_derive/src/ser.rs:292:51 | 292 | assert!(fields.len() as u64 <= u64::from(u32::max_value())); | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants = note: `#[warn(clippy::legacy_numeric_constants)]` on by default help: use the associated constant instead | 292 | assert!(fields.len() as u64 <= u64::from(u32::MAX)); | ~~~ warning: usage of a legacy numeric method --> serde_derive/src/ser.rs:400:53 | 400 | assert!(variants.len() as u64 <= u64::from(u32::max_value())); | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants help: use the associated constant instead | 400 | assert!(variants.len() as u64 <= u64::from(u32::MAX)); | ~~~ warning: usage of a legacy numeric method --> test_suite/tests/test_de_error.rs:1462:29 | 1462 | Token::U64(u64::max_value()), | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants = note: `-W clippy::legacy-numeric-constants` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::legacy_numeric_constants)]` help: use the associated constant instead | 1462 | Token::U64(u64::MAX), | ~~~ warning: usage of a legacy numeric method --> test_suite/tests/test_de_error.rs:1479:29 | 1479 | Token::U64(u64::max_value()), | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants help: use the associated constant instead | 1479 | Token::U64(u64::MAX), | ~~~ warning: usage of a legacy numeric method --> test_suite/tests/test_de_error.rs:1493:29 | 1493 | Token::U64(u64::max_value()), | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants help: use the associated constant instead | 1493 | Token::U64(u64::MAX), | ~~~ warning: usage of a legacy numeric method --> test_suite/tests/test_de_error.rs:1510:29 | 1510 | Token::U64(u64::max_value()), | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants help: use the associated constant instead | 1510 | Token::U64(u64::MAX), | ~~~
The serialization implementation is heavily inspired by the existing trait implentation for `std::num::Wrapping<T>`. The deserializing implementation maps input values that lie outside of the numerical range of the output type to the `MIN` or `MAX` value of the output type, depending on the sign of the input value. This behaviour follows to the `Saturating` semantics of the output type. fix #2708
This reverts commit 3bfab6e.
Implement Ser+De for Saturating<T>
Integrate Saturating<T> deserialization into impl_deserialize_num macro
warning: casting `i32` to `f32` causes a loss of precision (`i32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) --> serde/src/de/impls.rs:197:16 | 197 | Ok(v as Self::Value) | ^^^^^^^^^^^^^^^^ ... 457 | / impl_deserialize_num! { 458 | | f32, deserialize_f32 459 | | num_self!(f32:visit_f32); 460 | | num_as_copysign_self!(f64:visit_f64); 461 | | num_as_self!(i8:visit_i8 i16:visit_i16 i32:visit_i32 i64:visit_i64); 462 | | num_as_self!(u8:visit_u8 u16:visit_u16 u32:visit_u32 u64:visit_u64); 463 | | } | |_- in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss = note: `-W clippy::cast-precision-loss` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_precision_loss)]` = note: this warning originates in the macro `num_as_self` which comes from the expansion of the macro `impl_deserialize_num` (in Nightly builds, run with -Z macro-backtrace for more info) warning: casting `i64` to `f32` causes a loss of precision (`i64` is 64 bits wide, but `f32`'s mantissa is only 23 bits wide) --> serde/src/de/impls.rs:197:16 | 197 | Ok(v as Self::Value) | ^^^^^^^^^^^^^^^^ ... 457 | / impl_deserialize_num! { 458 | | f32, deserialize_f32 459 | | num_self!(f32:visit_f32); 460 | | num_as_copysign_self!(f64:visit_f64); 461 | | num_as_self!(i8:visit_i8 i16:visit_i16 i32:visit_i32 i64:visit_i64); 462 | | num_as_self!(u8:visit_u8 u16:visit_u16 u32:visit_u32 u64:visit_u64); 463 | | } | |_- in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss = note: this warning originates in the macro `num_as_self` which comes from the expansion of the macro `impl_deserialize_num` (in Nightly builds, run with -Z macro-backtrace for more info) warning: casting `u32` to `f32` causes a loss of precision (`u32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide) --> serde/src/de/impls.rs:197:16 | 197 | Ok(v as Self::Value) | ^^^^^^^^^^^^^^^^ ... 457 | / impl_deserialize_num! { 458 | | f32, deserialize_f32 459 | | num_self!(f32:visit_f32); 460 | | num_as_copysign_self!(f64:visit_f64); 461 | | num_as_self!(i8:visit_i8 i16:visit_i16 i32:visit_i32 i64:visit_i64); 462 | | num_as_self!(u8:visit_u8 u16:visit_u16 u32:visit_u32 u64:visit_u64); 463 | | } | |_- in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss = note: this warning originates in the macro `num_as_self` which comes from the expansion of the macro `impl_deserialize_num` (in Nightly builds, run with -Z macro-backtrace for more info) warning: casting `u64` to `f32` causes a loss of precision (`u64` is 64 bits wide, but `f32`'s mantissa is only 23 bits wide) --> serde/src/de/impls.rs:197:16 | 197 | Ok(v as Self::Value) | ^^^^^^^^^^^^^^^^ ... 457 | / impl_deserialize_num! { 458 | | f32, deserialize_f32 459 | | num_self!(f32:visit_f32); 460 | | num_as_copysign_self!(f64:visit_f64); 461 | | num_as_self!(i8:visit_i8 i16:visit_i16 i32:visit_i32 i64:visit_i64); 462 | | num_as_self!(u8:visit_u8 u16:visit_u16 u32:visit_u32 u64:visit_u64); 463 | | } | |_- in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss = note: this warning originates in the macro `num_as_self` which comes from the expansion of the macro `impl_deserialize_num` (in Nightly builds, run with -Z macro-backtrace for more info) warning: casting `i64` to `f64` causes a loss of precision (`i64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) --> serde/src/de/impls.rs:197:16 | 197 | Ok(v as Self::Value) | ^^^^^^^^^^^^^^^^ ... 465 | / impl_deserialize_num! { 466 | | f64, deserialize_f64 467 | | num_self!(f64:visit_f64); 468 | | num_as_copysign_self!(f32:visit_f32); 469 | | num_as_self!(i8:visit_i8 i16:visit_i16 i32:visit_i32 i64:visit_i64); 470 | | num_as_self!(u8:visit_u8 u16:visit_u16 u32:visit_u32 u64:visit_u64); 471 | | } | |_- in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss = note: this warning originates in the macro `num_as_self` which comes from the expansion of the macro `impl_deserialize_num` (in Nightly builds, run with -Z macro-backtrace for more info) warning: casting `u64` to `f64` causes a loss of precision (`u64` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide) --> serde/src/de/impls.rs:197:16 | 197 | Ok(v as Self::Value) | ^^^^^^^^^^^^^^^^ ... 465 | / impl_deserialize_num! { 466 | | f64, deserialize_f64 467 | | num_self!(f64:visit_f64); 468 | | num_as_copysign_self!(f32:visit_f32); 469 | | num_as_self!(i8:visit_i8 i16:visit_i16 i32:visit_i32 i64:visit_i64); 470 | | num_as_self!(u8:visit_u8 u16:visit_u16 u32:visit_u32 u64:visit_u64); 471 | | } | |_- in this macro invocation | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_precision_loss = note: this warning originates in the macro `num_as_self` which comes from the expansion of the macro `impl_deserialize_num` (in Nightly builds, run with -Z macro-backtrace for more info)
fix: ambiguous associated item in forward_to_deserialize_any!
bef110b changed the display for unexpected floats to always append a ".0" if there was no decimal point found in the formatting of the float. However, this should only be relevant for finite (i.e., not NaN or inf) values. The change introduced a test failure in the ordered-float crate due to this: ---- impl_serde::test_fail_on_nan stdout ---- thread 'impl_serde::test_fail_on_nan' panicked at 'assertion failed: `(left == right)` left: `Error { msg: "invalid value: floating point `NaN.0`, expected float (but not NaN)" }`, right: `"invalid value: floating point `NaN`, expected float (but not NaN)"`', src/lib.rs:1554:9 stack backtrace: 0: rust_begin_unwind at /usr/src/rustc-1.70.0/library/std/src/panicking.rs:578:5 1: core::panicking::panic_fmt at /usr/src/rustc-1.70.0/library/core/src/panicking.rs:67:14 2: core::panicking::assert_failed_inner 3: core::panicking::assert_failed at /usr/src/rustc-1.70.0/library/core/src/panicking.rs:228:5 4: serde_test::assert::assert_de_tokens_error at /usr/share/cargo/registry/serde_test-1.0.171/src/assert.rs:228:19 5: ordered_float::impl_serde::test_fail_on_nan at ./src/lib.rs:1554:9 6: ordered_float::impl_serde::test_fail_on_nan::{{closure}} at ./src/lib.rs:1553:27 7: core::ops::function::FnOnce::call_once at /usr/src/rustc-1.70.0/library/core/src/ops/function.rs:250:5 8: core::ops::function::FnOnce::call_once at /usr/src/rustc-1.70.0/library/core/src/ops/function.rs:250:5 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Only format Unexpected::Float with decimal point if it is finite
warning: unexpected `cfg` condition name: `serde_build_from_git` --> serde_derive_internals/lib.rs:45:12 | 45 | #[cfg_attr(serde_build_from_git, path = "../serde_derive/src/internals/mod.rs")] | ^^^^^^^^^^^^^^^^^^^^ | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows` = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(serde_build_from_git)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition name: `serde_build_from_git` --> serde_derive_internals/lib.rs:46:16 | 46 | #[cfg_attr(not(serde_build_from_git), path = "src/mod.rs")] | ^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(serde_build_from_git)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `deserialize_in_place` --> serde_derive_internals/src/attr.rs:276:11 | 276 | #[cfg(feature = "deserialize_in_place")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition | = note: no expected values for `feature` = help: consider adding `deserialize_in_place` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `exhaustive` --> serde_derive_internals/src/attr.rs:1797:31 | 1797 | #![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))] | ^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(exhaustive)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `exhaustive` --> serde_derive_internals/src/receiver.rs:110:35 | 110 | #![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))] | ^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(exhaustive)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `exhaustive` --> serde_derive_internals/src/receiver.rs:181:47 | 181 | #![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))] | ^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(exhaustive)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `exhaustive` --> serde_derive_internals/src/receiver.rs:210:35 | 210 | #![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))] | ^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(exhaustive)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `exhaustive` --> serde_derive_internals/src/receiver.rs:231:43 | 231 | #![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))] | ^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(exhaustive)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `exhaustive` --> serde_derive/src/lib.rs:62:23 | 62 | #![cfg_attr(all(test, exhaustive), feature(non_exhaustive_omitted_patterns_lint))] | ^^^^^^^^^^ | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows` = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(exhaustive)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition name: `exhaustive` --> serde_derive/src/internals/attr.rs:1797:31 | 1797 | #![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))] | ^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(exhaustive)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `exhaustive` --> serde_derive/src/internals/receiver.rs:110:35 | 110 | #![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))] | ^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(exhaustive)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `exhaustive` --> serde_derive/src/internals/receiver.rs:181:47 | 181 | #![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))] | ^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(exhaustive)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `exhaustive` --> serde_derive/src/internals/receiver.rs:210:35 | 210 | #![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))] | ^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(exhaustive)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `exhaustive` --> serde_derive/src/internals/receiver.rs:231:43 | 231 | #![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))] | ^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(exhaustive)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `exhaustive` --> serde_derive/src/bound.rs:147:39 | 147 | #![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))] | ^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(exhaustive)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `exhaustive` --> serde_derive/src/bound.rs:199:51 | 199 | ... #![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))] | ^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(exhaustive)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `exhaustive` --> serde_derive/src/bound.rs:228:39 | 228 | #![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))] | ^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(exhaustive)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `systemtime_checked_add` --> test_suite/tests/test_de_error.rs:1527:7 | 1527 | #[cfg(systemtime_checked_add)] | ^^^^^^^^^^^^^^^^^^^^^^ | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows` = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(systemtime_checked_add)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default
Resolve unexpected_cfgs warning
warning: this `match` expression can be replaced with `?` --> serde/build.rs:111:17 | 111 | let rustc = match env::var_os("RUSTC") { | _________________^ 112 | | Some(rustc) => rustc, 113 | | None => return None, 114 | | }; | |_____^ help: try instead: `env::var_os("RUSTC")?` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark = note: `-W clippy::question-mark` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::question_mark)]` warning: this `match` expression can be replaced with `?` --> serde/build.rs:131:16 | 131 | let next = match pieces.next() { | ________________^ 132 | | Some(next) => next, 133 | | None => return None, 134 | | }; | |_____^ help: try instead: `pieces.next()?` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark
This hides the generated visitors and field visitors from code coverage.
Mark generated `impl de::Visitor` blocks as `#[automatically_derived]`
Mark all generated trait impls as #[automatically_derived]
Replace #[start] with extern fn main
Drop #[lang = "eh_personality"] from no-std test
warning: item uses `packed` representation without ABI-qualification --> test_suite/tests/test_gen.rs:774:5 | 772 | #[repr(packed)] | ------ `packed` representation set here 773 | #[allow(dead_code)] 774 | / struct Packed { 775 | | x: u8, 776 | | y: u16, 777 | | } | |_____^ | = warning: unqualified `#[repr(packed)]` defaults to `#[repr(Rust, packed)]`, which has no stable ABI = help: qualify the desired ABI explicity via `#[repr(C, packed)]` or `#[repr(Rust, packed)]` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#repr_packed_without_abi note: the lint level is defined here --> test_suite/tests/test_gen.rs:5:9 | 5 | #![deny(warnings)] | ^^^^^^^^ = note: `#[warn(clippy::repr_packed_without_abi)]` implied by `#[warn(warnings)]` warning: item uses `packed` representation without ABI-qualification --> test_suite/tests/test_gen.rs:919:1 | 918 | #[repr(packed)] | ------ `packed` representation set here 919 | / pub struct RemotePacked { 920 | | pub a: u16, 921 | | pub b: u32, 922 | | } | |_^ | = warning: unqualified `#[repr(packed)]` defaults to `#[repr(Rust, packed)]`, which has no stable ABI = help: qualify the desired ABI explicity via `#[repr(C, packed)]` or `#[repr(Rust, packed)]` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#repr_packed_without_abi warning: item uses `packed` representation without ABI-qualification --> test_suite/tests/test_gen.rs:927:1 | 925 | #[repr(packed)] | ------ `packed` representation set here 926 | #[serde(remote = "RemotePacked")] 927 | / pub struct RemotePackedDef { 928 | | a: u16, 929 | | b: u32, 930 | | } | |_^ | = warning: unqualified `#[repr(packed)]` defaults to `#[repr(Rust, packed)]`, which has no stable ABI = help: qualify the desired ABI explicity via `#[repr(C, packed)]` or `#[repr(Rust, packed)]` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#repr_packed_without_abi warning: item uses `packed` representation without ABI-qualification --> test_suite/tests/test_gen.rs:937:1 | 936 | #[repr(packed)] | ------ `packed` representation set here 937 | / pub struct RemotePackedNonCopy { 938 | | pub a: u16, 939 | | pub b: String, 940 | | } | |_^ | = warning: unqualified `#[repr(packed)]` defaults to `#[repr(Rust, packed)]`, which has no stable ABI = help: qualify the desired ABI explicity via `#[repr(C, packed)]` or `#[repr(Rust, packed)]` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#repr_packed_without_abi warning: item uses `packed` representation without ABI-qualification --> test_suite/tests/test_gen.rs:945:1 | 943 | #[repr(packed)] | ------ `packed` representation set here 944 | #[serde(remote = "RemotePackedNonCopy")] 945 | / pub struct RemotePackedNonCopyDef { 946 | | a: u16, 947 | | b: String, 948 | | } | |_^ | = warning: unqualified `#[repr(packed)]` defaults to `#[repr(Rust, packed)]`, which has no stable ABI = help: qualify the desired ABI explicity via `#[repr(C, packed)]` or `#[repr(Rust, packed)]` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#repr_packed_without_abi
- deserialization of flatten unit variant is possible - serialization of such variant gives Err("can only flatten structs and maps (got an enum)")
Cargo stopped generating this in its project template 5 years ago. It would belong in a global gitignore instead.
This belongs in someone's global gitignore.
False is the default value since Cargo PR 11499.
Convert html links to intra-doc links
Point standard library links to stable
Also link to stable proc_macro
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.