1737 Commits

Author SHA1 Message Date
David Tolnay
fedf8341ee
Ignore non_local_definitions false positive in test
https://github.com/rust-lang/rust/issues/121621

    warning: non-local `impl` definition, they should be avoided as they go against expectation
        --> tests/test.rs:2338:5
         |
    2338 | /     impl<'de> Deserialize<'de> for &'de RawMapKey {
    2339 | |         fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    2340 | |         where
    2341 | |             D: serde::Deserializer<'de>,
    ...    |
    2345 | |         }
    2346 | |     }
         | |_____^
         |
         = help: move this `impl` block outside the of the current function `test_raw_value_in_map_key`
         = note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
         = note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
         = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
         = note: `#[warn(non_local_definitions)]` on by default
2024-02-25 19:50:26 -08:00
David Tolnay
e1b3a6d8a1
Release 1.0.114 v1.0.114 2024-02-19 16:12:45 -08:00
David Tolnay
6fb70262e8
Work around prelude redundant import warnings
https://github.com/rust-lang/rust/pull/117772

    warning: the item `String` is imported redundantly
       --> src/de.rs:8:5
        |
    8   | use alloc::string::String;
        |     ^^^^^^^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `String` is already defined here
        |
        = note: `#[warn(unused_imports)]` on by default

    warning: the item `Vec` is imported redundantly
       --> src/de.rs:9:5
        |
    9   | use alloc::vec::Vec;
        |     ^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `Vec` is already defined here

    warning: the item `Box` is imported redundantly
       --> src/error.rs:4:5
        |
    4   | use alloc::boxed::Box;
        |     ^^^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `Box` is already defined here

    warning: the item `String` is imported redundantly
       --> src/error.rs:5:21
        |
    5   | use alloc::string::{String, ToString};
        |                     ^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `String` is already defined here

    warning: the item `ToString` is imported redundantly
       --> src/error.rs:5:29
        |
    5   | use alloc::string::{String, ToString};
        |                             ^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `ToString` is already defined here

    warning: the item `String` is imported redundantly
       --> src/map.rs:10:5
        |
    10  | use alloc::string::String;
        |     ^^^^^^^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `String` is already defined here

    warning: the item `indexmap` is imported redundantly
      --> src/map.rs:23:16
       |
    23 | use indexmap::{self, IndexMap};
       |                ^^^^ the item `indexmap` is already defined here
       |
       = note: `#[warn(unused_imports)]` on by default

    warning: the item `String` is imported redundantly
       --> src/ser.rs:5:21
        |
    5   | use alloc::string::{String, ToString};
        |                     ^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `String` is already defined here

    warning: the item `ToString` is imported redundantly
       --> src/ser.rs:5:29
        |
    5   | use alloc::string::{String, ToString};
        |                             ^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `ToString` is already defined here

    warning: the item `Vec` is imported redundantly
       --> src/ser.rs:6:5
        |
    6   | use alloc::vec::Vec;
        |     ^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `Vec` is already defined here

    warning: the item `String` is imported redundantly
       --> src/value/mod.rs:95:5
        |
    95  | use alloc::string::String;
        |     ^^^^^^^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `String` is already defined here

    warning: the item `Vec` is imported redundantly
       --> src/value/mod.rs:96:5
        |
    96  | use alloc::vec::Vec;
        |     ^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `Vec` is already defined here

    warning: the item `ToOwned` is imported redundantly
       --> src/value/de.rs:5:26
        |
    5   | use alloc::borrow::{Cow, ToOwned};
        |                          ^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `ToOwned` is already defined here

    warning: the item `String` is imported redundantly
       --> src/value/de.rs:6:5
        |
    6   | use alloc::string::String;
        |     ^^^^^^^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `String` is already defined here

    warning: the item `Vec` is imported redundantly
       --> src/value/de.rs:9:24
        |
    9   | use alloc::vec::{self, Vec};
        |                        ^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `Vec` is already defined here

    warning: the item `String` is imported redundantly
       --> src/value/from.rs:5:21
        |
    5   | use alloc::string::{String, ToString};
        |                     ^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `String` is already defined here

    warning: the item `ToString` is imported redundantly
       --> src/value/from.rs:5:29
        |
    5   | use alloc::string::{String, ToString};
        |                             ^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `ToString` is already defined here

    warning: the item `Vec` is imported redundantly
       --> src/value/from.rs:6:5
        |
    6   | use alloc::vec::Vec;
        |     ^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `Vec` is already defined here

    warning: the item `ToOwned` is imported redundantly
       --> src/value/index.rs:3:5
        |
    3   | use alloc::borrow::ToOwned;
        |     ^^^^^^^^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `ToOwned` is already defined here

    warning: the item `String` is imported redundantly
       --> src/value/index.rs:4:5
        |
    4   | use alloc::string::String;
        |     ^^^^^^^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `String` is already defined here

    warning: the item `String` is imported redundantly
       --> src/value/partial_eq.rs:2:5
        |
    2   | use alloc::string::String;
        |     ^^^^^^^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `String` is already defined here

    warning: the item `ToOwned` is imported redundantly
       --> src/value/ser.rs:4:5
        |
    4   | use alloc::borrow::ToOwned;
        |     ^^^^^^^^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `ToOwned` is already defined here

    warning: the item `String` is imported redundantly
       --> src/value/ser.rs:5:21
        |
    5   | use alloc::string::{String, ToString};
        |                     ^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `String` is already defined here

    warning: the item `ToString` is imported redundantly
       --> src/value/ser.rs:5:29
        |
    5   | use alloc::string::{String, ToString};
        |                             ^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `ToString` is already defined here

    warning: the item `Vec` is imported redundantly
       --> src/value/ser.rs:6:5
        |
    6   | use alloc::vec::Vec;
        |     ^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `Vec` is already defined here

    warning: the item `Vec` is imported redundantly
       --> src/read.rs:2:5
        |
    2   | use alloc::vec::Vec;
        |     ^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `Vec` is already defined here

    warning: the item `ToString` is imported redundantly
       --> tests/test.rs:46:5
        |
    46  | use std::string::ToString;
        |     ^^^^^^^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `ToString` is already defined here
        |
        = note: `#[warn(unused_imports)]` on by default

    warning: the item `Vec` is imported redundantly
       --> tests/../src/lexical/bignum.rs:6:5
        |
    6   | use alloc::vec::Vec;
        |     ^^^^^^^^^^^^^^^
        |
       ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
        |
    125 |     pub use super::v1::*;
        |             --------- the item `Vec` is already defined here
        |
        = note: `#[warn(unused_imports)]` on by default
2024-02-19 16:11:47 -08:00
David Tolnay
34a04c5f7f
Ignore incompatible_msrv clippy false positives in test
https://github.com/rust-lang/rust-clippy/issues/12257

    warning: current MSRV (Minimum Supported Rust Version) is `1.56.0` but this item is stable since `1.71.0`
        --> tests/test.rs:2500:25
         |
    2500 |         assert_ne!(rand.hash_one(k1), rand.hash_one(k2));
         |                         ^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
         = note: `-W clippy::incompatible-msrv` implied by `-W clippy::all`
         = help: to override `-W clippy::all` add `#[allow(clippy::incompatible_msrv)]`

    warning: current MSRV (Minimum Supported Rust Version) is `1.56.0` but this item is stable since `1.71.0`
        --> tests/test.rs:2500:44
         |
    2500 |         assert_ne!(rand.hash_one(k1), rand.hash_one(k2));
         |                                            ^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv

    warning: current MSRV (Minimum Supported Rust Version) is `1.56.0` but this item is stable since `1.71.0`
        --> tests/test.rs:2503:25
         |
    2503 |         assert_eq!(rand.hash_one(k1), rand.hash_one(k2));
         |                         ^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv

    warning: current MSRV (Minimum Supported Rust Version) is `1.56.0` but this item is stable since `1.71.0`
        --> tests/test.rs:2503:44
         |
    2503 |         assert_eq!(rand.hash_one(k1), rand.hash_one(k2));
         |                                            ^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
2024-02-09 18:58:51 -08:00
David Tolnay
ca05f69943
Remove unused Float::is_sign_negative trait method
warning: method `is_sign_negative` is never used
       --> src/lexical/num.rs:251:8
        |
    175 | pub trait Float: Number {
        |           ----- method in this trait
    ...
    251 |     fn is_sign_negative(self) -> bool;
        |        ^^^^^^^^^^^^^^^^
        |
        = note: `#[warn(dead_code)]` on by default
2024-02-07 21:15:18 -08:00
David Tolnay
09d865b34b
Release 1.0.113 v1.0.113 2024-01-28 19:44:38 -08:00
David Tolnay
5aeab4eaf6
Merge pull request #1109 from serde-rs/remove
Add swap_remove and shift_remove methods on Map
2024-01-28 19:44:13 -08:00
David Tolnay
ca3c2ca369
Add swap_remove and shift_remove methods on Map 2024-01-28 19:37:25 -08:00
David Tolnay
7fece969e3
Release 1.0.112 v1.0.112 2024-01-26 14:02:01 -08:00
David Tolnay
6a6d2bbd9e
Merge pull request #1107 from serde-rs/unexpectedfloat
Format f64 in error messages using ryu
2024-01-26 13:19:49 -08:00
David Tolnay
83d7bad54b
Format f64 in error messages using ryu 2024-01-26 13:14:48 -08:00
David Tolnay
107c2d1c42
Merge pull request #1106 from serde-rs/invalidvalue
Handle Unexpected::Unit in Error::invalid_value
2024-01-26 13:11:42 -08:00
David Tolnay
62ca3e4c01
Handle Unexpected::Unit in Error::invalid_value 2024-01-26 13:04:35 -08:00
David Tolnay
296fafb8f3
Factor out JSON-specific Display impl for serde:🇩🇪:Unexpected 2024-01-26 13:03:17 -08:00
David Tolnay
e56cc696bd
Merge pull request #1105 from keienWang/master
fix: Correct spelling error
2024-01-26 08:38:28 -08:00
keienWang
2909b0bac6 fix: Correct spelling error
Fixed a spelling error in the second paragraph of the README file.

- Changed "exponet" to "exponent"
2024-01-26 22:00:51 +08:00
David Tolnay
6d44b9fac9
Ignore unconditional_recursion clippy lint due to false positive
https://github.com/rust-lang/rust-clippy/issues/12133

    warning: function cannot return without recursing
       --> src/map.rs:276:5
        |
    276 | /     fn eq(&self, other: &Self) -> bool {
    277 | |         self.map.eq(&other.map)
    278 | |     }
        | |_____^
        |
    note: recursive call site
       --> src/map.rs:277:9
        |
    277 |         self.map.eq(&other.map)
        |         ^^^^^^^^^^^^^^^^^^^^^^^
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unconditional_recursion
        = note: `-W clippy::unconditional-recursion` implied by `-W clippy::all`
        = help: to override `-W clippy::all` add `#[allow(clippy::unconditional_recursion)]`
2024-01-11 20:16:59 -08:00
David Tolnay
0131ac6821
Release 1.0.111 v1.0.111 2024-01-03 23:28:45 -08:00
David Tolnay
96ecfadd3f
Merge pull request #1100 from heiher/limb-64-la64
Set limb width to 64 for loongarch64
2024-01-03 23:28:20 -08:00
WANG Rui
c80dbaf8ff Set limb width to 64 for loongarch64 2024-01-04 14:53:35 +08:00
David Tolnay
df5cf215b7
Release 1.0.110 v1.0.110 2024-01-01 23:09:59 -08:00
David Tolnay
c35856a93c
Pull in proc-macro2 sccache fix 2024-01-01 23:09:24 -08:00
David Tolnay
f88bf1fccb
Release 1.0.109 v1.0.109 2023-12-31 16:46:22 -08:00
David Tolnay
bb62c73ece
Merge pull request #1097 from serde-rs/doccfg
Restore doc cfg on re-exports
2023-12-31 16:45:59 -08:00
David Tolnay
df36d109fd
Restore doc cfg on re-exports 2023-12-31 16:42:07 -08:00
David Tolnay
c367091342
Merge pull request #1095 from dtolnay/hashtest
Resolve manual_hash_one lint in test
2023-12-28 15:46:41 -08:00
David Tolnay
b328ee7df4
Eliminate hash closure in favor of calling hash_one directly 2023-12-28 15:43:44 -08:00
David Tolnay
b9bcbad3c0
Use BuildHasher::hash_one 2023-12-28 15:43:44 -08:00
David Tolnay
7ff6c9e30c
Use random hasher state for number hashing test 2023-12-28 15:37:25 -08:00
David Tolnay
fe031cd1de
Delete trace_macros! functionality from test 2023-12-28 15:29:20 -08:00
David Tolnay
05196caf16
Update ui test suite to nightly-2023-11-19 2023-11-18 18:14:15 -08:00
David Tolnay
4bc1eaa03a
Release 1.0.108 v1.0.108 2023-10-30 11:36:54 -04:00
David Tolnay
1454eac069
Merge pull request #1082 from dtolnay/fromdoc
Improve Value From and FromIterator docs
2023-10-30 11:36:13 -04:00
David Tolnay
0f072fad73
Improve Value From and FromIterator docs 2023-10-30 11:26:17 -04:00
David Tolnay
a8e6f75a9b
Merge pull request #1081 from fritzrehde/master
Fixed some typos
2023-10-30 11:22:05 -04:00
fritzrehde
ebaf61709a fixed typos 2023-10-30 15:20:19 +01:00
David Tolnay
f56053d6f8
Merge pull request #1080 from serde-rs/negativenan
Add test of negative NaN and negative infinity
2023-10-25 10:51:06 -07:00
David Tolnay
4e091d5d6d
Add test of negative NaN and negative infinity 2023-10-25 10:41:10 -07:00
David Tolnay
421a70d1a6
Fix unused imports
warning: unused imports: `parse_concise_float`, `parse_truncated_float`
      --> tests/../src/lexical/mod.rs:38:23
       |
    38 | pub use self::parse::{parse_concise_float, parse_truncated_float};
       |                       ^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^
       |
       = note: `#[warn(unused_imports)]` on by default

    warning: unused import: `std::vec::Vec`
      --> tests/lexical.rs:30:13
       |
    30 |     pub use std::vec::Vec;
       |             ^^^^^^^^^^^^^

    warning: unused imports: `cmp`, `iter`, `mem`, `ops`
      --> tests/lexical.rs:31:19
       |
    31 |     pub use std::{cmp, iter, mem, ops};
       |                   ^^^  ^^^^  ^^^  ^^^
2023-10-24 23:35:42 -07:00
David Tolnay
39f5ad1534
Remove 'remember to update' reminder from Cargo.toml 2023-10-17 21:05:31 -07:00
David Tolnay
5bb696029d
Merge pull request #1075 from dimo414/master
Remove a few unnecessary lifetimes
2023-10-06 15:03:56 -04:00
Michael Diamond
9d86391170 Remove a few unnecessary lifetimes 2023-10-06 00:50:19 -07:00
David Tolnay
57d529b70f
Test docs.rs documentation build in CI 2023-09-24 10:53:44 -07:00
David Tolnay
b6e113f203
Release 1.0.107 v1.0.107 2023-09-13 16:53:39 -06:00
David Tolnay
00626a0a95
Merge pull request #1073 from dtolnay/rawvalue
IntoDeserializer for &RawValue
2023-09-13 16:53:18 -06:00
David Tolnay
b9d296f87d
IntoDeserializer for &RawValue 2023-09-13 16:47:17 -06:00
David Tolnay
4ea34a2566
Merge pull request #1072 from dtolnay/rawvalue
Support deserializing from &RawValue
2023-09-13 16:47:08 -06:00
David Tolnay
fe30766ae5
Support deserializing from &RawValue 2023-09-13 16:36:30 -06:00
David Tolnay
2c22077f0e
Merge pull request #1062 from osiewicz/remove_build_rs
Simplify/remove build.rs following the bump to 2021 edition
2023-09-11 16:23:52 -07:00
Piotr Osiewicz
04f7758b6e fixup! chore: Remove no_btreemap_get_key_value and no_btreemap_remove_entry. 2023-09-11 11:23:47 +02:00