Commit Graph

3063 Commits

Author SHA1 Message Date
David Tolnay
91bfa8f947
Refresh expandtest files with most recent rustfmt 2021-01-08 19:54:21 -08:00
David Tolnay
8847800ce2
Ignore from_over_into clippy lint in test suite 2021-01-03 19:05:43 -08:00
David Tolnay
3c9fa1ccdf
Switch to short form for serde.rs link in rustdoc
Fixes a rustdoc warning:

    warning: unneeded long form for URL
      --> serde/src/lib.rs:12:27
       |
    12 | //! See the Serde website [https://serde.rs/] for additional documentation and
       |                           ^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<https://serde.rs/>`
       |
       = note: `#[warn(non_autolinks)]` on by default
2020-12-21 10:35:28 -08:00
David Tolnay
3c29a8857f
Merge pull request #1936 from bryanburgers/add-serde-dynamo
Add serde_dynamo to the list of data formats
2020-12-21 10:33:45 -08:00
Bryan Burgers
a5da27e16d Add serde_dynamo to the list of data formats 2020-12-21 10:51:56 -06:00
David Tolnay
e797431268
Release 1.0.118 2020-12-05 13:45:47 -08:00
David Tolnay
4a335f8933
Merge pull request #1926 from attente/core-num-wrapping
Allow serializing of Wrapping without std
2020-12-05 13:43:20 -08:00
David Tolnay
84721920fd
Resolve clippy items_after_statements lint
error: adding items after statements is confusing, since items exist from the start of the scope
        --> serde/src/de/impls.rs:1876:9
         |
    1876 | /         impl<'de> Deserialize<'de> for Field {
    1877 | |             fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    1878 | |             where
    1879 | |                 D: Deserializer<'de>,
    ...    |
    1917 | |             }
    1918 | |         }
         | |_________^
         |
    note: the lint level is defined here
        --> serde/src/lib.rs:95:52
         |
    95   | #![cfg_attr(feature = "cargo-clippy", deny(clippy, clippy_pedantic))]
         |                                                    ^^^^^^^^^^^^^^^
         = note: `#[deny(clippy::items_after_statements)]` implied by `#[deny(clippy::pedantic)]`
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements

    error: adding items after statements is confusing, since items exist from the start of the scope
        --> serde/src/de/impls.rs:1920:9
         |
    1920 |         struct DurationVisitor;
         |         ^^^^^^^^^^^^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements

    error: adding items after statements is confusing, since items exist from the start of the scope
        --> serde/src/de/impls.rs:1922:9
         |
    1922 | /         impl<'de> Visitor<'de> for DurationVisitor {
    1923 | |             type Value = Duration;
    1924 | |
    1925 | |             fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
    ...    |
    1979 | |             }
    1980 | |         }
         | |_________^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements

    error: adding items after statements is confusing, since items exist from the start of the scope
        --> serde/src/de/impls.rs:1982:9
         |
    1982 |         const FIELDS: &'static [&'static str] = &["secs", "nanos"];
         |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements

    error: adding items after statements is confusing, since items exist from the start of the scope
        --> serde/src/de/impls.rs:2001:9
         |
    2001 | /         impl<'de> Deserialize<'de> for Field {
    2002 | |             fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    2003 | |             where
    2004 | |                 D: Deserializer<'de>,
    ...    |
    2042 | |             }
    2043 | |         }
         | |_________^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements

    error: adding items after statements is confusing, since items exist from the start of the scope
        --> serde/src/de/impls.rs:2045:9
         |
    2045 |         struct DurationVisitor;
         |         ^^^^^^^^^^^^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements

    error: adding items after statements is confusing, since items exist from the start of the scope
        --> serde/src/de/impls.rs:2047:9
         |
    2047 | /         impl<'de> Visitor<'de> for DurationVisitor {
    2048 | |             type Value = Duration;
    2049 | |
    2050 | |             fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
    ...    |
    2108 | |             }
    2109 | |         }
         | |_________^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements

    error: adding items after statements is confusing, since items exist from the start of the scope
        --> serde/src/de/impls.rs:2111:9
         |
    2111 |         const FIELDS: &'static [&'static str] = &["secs_since_epoch", "nanos_since_epoch"];
         |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements
2020-11-28 19:08:41 -08:00
David Tolnay
192c7819ee
Format with rustfmt 1.4.25-beta 2020-11-28 19:06:37 -08:00
William Hua
ede40bdfaa Allow serializing of Wrapping without std 2020-11-24 00:56:10 -05:00
David Tolnay
e3d871ff7b
Opt in to experimental trybuild diffs 2020-10-31 13:28:19 -07:00
David Tolnay
0e1c4093c8
Suppress new result_unit_err clippy lint 2020-10-27 19:20:45 -07:00
David Tolnay
0d5b6c180c
Resolve ptr_eq clippy lint
error: use `std::ptr::eq` when comparing raw pointers
       --> serde_derive/src/de.rs:362:12
        |
    362 |         if field as *const Field == transparent_field as *const Field {
        |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::eq(field, transparent_field)`
        |
    note: the lint level is defined here
       --> serde_derive/src/lib.rs:18:9
        |
    18  | #![deny(clippy::all, clippy::pedantic)]
        |         ^^^^^^^^^^^
        = note: `#[deny(clippy::ptr_eq)]` implied by `#[deny(clippy::all)]`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_eq
2020-10-27 19:18:29 -07:00
David Tolnay
8084258a3e
Update ui tests to nightly-2020-10-20 2020-10-20 19:17:50 -07:00
David Tolnay
fc3f104c4a
Release 1.0.117 2020-10-15 09:49:03 -07:00
David Tolnay
4bec9ffd0f
Merge pull request #1906 from Mingun/fix-misprint
Fix misprint in the error message
2020-10-11 12:13:03 -07:00
Mingun
e6d2322e68 Fix misprint in the error message 2020-10-12 00:03:21 +05:00
David Tolnay
2b504099e4
Include room for SocketAddrV6 to serialize scope id
https://github.com/rust-lang/rust/pull/77426
2020-10-05 04:02:05 -07:00
David Tolnay
be7d0e7eb2
Ignore map_err_ignore Clippy pedantic lint 2020-09-25 21:55:59 -04:00
David Tolnay
b539cb45d7
Release 1.0.116 2020-09-11 11:56:19 -07:00
David Tolnay
a5490e20e1
Merge pull request #1888 from joshtriplett/fix-enum-deserialization-u64
Fix hand-written enum variant deserializations to allow u64 discriminant
2020-09-11 11:55:35 -07:00
Josh Triplett
45c45e87bf Fix hand-written enum variant deserializations to allow u64 discriminant
Automatically generated enum variant deserializers allowed any integer
type as the discriminant, but the hand-written ones for specific enum
types such as Result or IpAddr only allowed types up to u32. This broke
some non-human-readable deserializers for these enums, with
deserializers that emit any integer type as a u64. Switch the visit_u32
methods to visit_u64 methods to allow discriminants to have any size up
to a u64.
2020-09-10 23:24:33 -07:00
David Tolnay
2e76f7013f
Update code of conduct link 2020-09-05 13:09:37 -07:00
David Tolnay
d35de19120
Merge pull request #1885 from dtolnay/qs
Replace serde_urlencoded link with serde_qs
2020-09-05 10:35:12 -07:00
David Tolnay
e5b3507145
Replace serde_urlencoded link with serde_qs 2020-09-05 10:26:36 -07:00
David Tolnay
7ea7c2ceb9
Merge pull request #1882 from dtolnay/bincode
Rename TyOverby/bincode to servo/bincode
2020-08-28 15:43:00 -07:00
David Tolnay
2b5b15967e
Rename TyOverby/bincode to servo/bincode 2020-08-28 15:36:51 -07:00
David Tolnay
2ef60b62ac
Release 1.0.115 2020-08-10 15:51:19 -07:00
David Tolnay
e6f086d85e
Merge pull request #1874 from dtolnay/flatunit
Support flattening a Unit
2020-08-10 15:50:30 -07:00
David Tolnay
bf76f50294
Support deserializing flattened unit 2020-08-10 15:06:52 -07:00
David Tolnay
ba07075590
Support serializing flattened unit 2020-08-10 15:06:47 -07:00
David Tolnay
26186bddd1
Add test for flattened unit 2020-08-10 15:06:34 -07:00
David Tolnay
53b9871b17
Quote no longer requires high recursion 2020-07-16 10:49:16 -07:00
David Tolnay
f8787c3ca8
Suppress match_like_matches_macro clippy lint 2020-07-14 18:57:26 -07:00
David Tolnay
3022064f84
Suppress option_if_let_else clippy pedantic lint 2020-07-14 18:57:24 -07:00
David Tolnay
9e140a2071
Tweak yaml format blurb 2020-07-05 20:00:33 -07:00
David Tolnay
24e6acbfae
Drop 'help or discussion' issue template
Per https://github.com/serde-rs/serde#getting-help we're steering these
to Discord / Stack Overflow / Reddit / etc.

Can reconsider when GitHub Discussions is out of beta
(https://github.com/vercel/next.js/discussions).
2020-07-04 20:44:22 -07:00
David Tolnay
29c5a50935
Suppress unused_attributes warning in test suite
This test has multiple #[ignore] attributes in some configurations.

    $ cargo +beta check --test expandtest
    warning: unused attribute
     --> test_suite/tests/expandtest.rs:2:29
      |
    2 | #[cfg_attr(not(expandtest), ignore)]
      |                             ^^^^^^
      |
      = note: `#[warn(unused_attributes)]` on by default
2020-06-26 21:37:30 -07:00
David Tolnay
c619b2a7c4
Suppress unknown_lints warning in test suite
When building with beta and older rustc:

    error: unknown lint: `mixed_script_confusables`
     --> test_suite/tests/test_gen.rs:7:10
      |
    7 | #![allow(mixed_script_confusables, clippy::trivially_copy_pass_by_ref)]
      |          ^^^^^^^^^^^^^^^^^^^^^^^^
      |
    note: the lint level is defined here
     --> test_suite/tests/test_gen.rs:5:9
      |
    5 | #![deny(warnings)]
      |         ^^^^^^^^
      = note: `#[deny(unknown_lints)]` implied by `#[deny(warnings)]`
2020-06-26 21:37:26 -07:00
David Tolnay
764ebd9b17
Suppress mixed_script_confusables in test suite
error: The usage of Script Group `Greek` in this crate consists solely of mixed script confusables
       --> test_suite/tests/test_gen.rs:269:9
        |
    269 |         σ: f64,
        |         ^
        |
    note: the lint level is defined here
       --> test_suite/tests/test_gen.rs:5:9
        |
    5   | #![deny(warnings)]
        |         ^^^^^^^^
        = note: `#[deny(mixed_script_confusables)]` implied by `#[deny(warnings)]`
        = note: The usage includes 'σ' (U+03C3).
        = note: Please recheck to make sure their usages are indeed what you want.
2020-06-26 19:06:13 -07:00
David Tolnay
9c6f0c3a0e
Release 1.0.114 2020-06-21 17:31:02 -07:00
David Tolnay
a9f8ea0a1e
Simplify search for packed repr attr 2020-06-21 17:22:07 -07:00
David Tolnay
04faac962a
Remove error_on_line_overflow rustfmt setting
No longer seeing warnings on this from rustfmt.
2020-06-21 16:48:22 -07:00
Tanner Rogalsky
7e5701ad2b add alignment specific packed repr tests 2020-06-21 16:46:27 -07:00
Tanner Rogalsky
1cd10a7d09 Improved packed repr matching. 2020-06-21 16:46:27 -07:00
Tanner Rogalsky
d5e6436b28 Add tests validating Serialize derivation for packed structs. 2020-06-21 16:46:27 -07:00
David Tolnay
8ff11dc234
Merge pull request #1841 from dtolnay/lenhint
Remove len hint specialization
2020-06-20 19:08:34 -07:00
David Tolnay
6b3777b617
Remove len hint specialization 2020-06-20 19:02:26 -07:00
David Tolnay
7350b58f5c
Release 1.0.113 2020-06-19 13:31:38 -07:00
David Tolnay
7351e0e55a
Link to feature announcements where available 2020-06-19 13:30:14 -07:00