854 Commits

Author SHA1 Message Date
David Tolnay
4b3178b053
Ignore needless_lifetimes clippy lint
warning: the following explicit lifetimes could be elided: 'de
       --> serde/src/de/value.rs:124:6
        |
    124 | impl<'de, E> IntoDeserializer<'de, E> for ()
        |      ^^^                      ^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
        = note: `-W clippy::needless-lifetimes` implied by `-W clippy::all`
        = help: to override `-W clippy::all` add `#[allow(clippy::needless_lifetimes)]`
    help: elide the lifetimes
        |
    124 - impl<'de, E> IntoDeserializer<'de, E> for ()
    124 + impl<E> IntoDeserializer<'_, E> for ()
        |

    warning: the following explicit lifetimes could be elided: 'de
       --> serde/src/de/value.rs:196:6
        |
    196 | impl<'de, E> IntoDeserializer<'de, E> for !
        |      ^^^                      ^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    196 - impl<'de, E> IntoDeserializer<'de, E> for !
    196 + impl<E> IntoDeserializer<'_, E> for !
        |

    warning: the following explicit lifetimes could be elided: 'de
       --> serde/src/de/value.rs:317:6
        |
    317 | impl<'de, E> IntoDeserializer<'de, E> for u32
        |      ^^^                      ^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    317 - impl<'de, E> IntoDeserializer<'de, E> for u32
    317 + impl<E> IntoDeserializer<'_, E> for u32
        |

    warning: the following explicit lifetimes could be elided: 'de
       --> serde/src/de/value.rs:406:6
        |
    406 | impl<'de, 'a, E> IntoDeserializer<'de, E> for &'a str
        |      ^^^                          ^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    406 - impl<'de, 'a, E> IntoDeserializer<'de, E> for &'a str
    406 + impl<'a, E> IntoDeserializer<'_, E> for &'a str
        |

    warning: the following explicit lifetimes could be elided: 'a
       --> serde/src/de/value.rs:427:11
        |
    427 | impl<'de, 'a, E> de::Deserializer<'de> for StrDeserializer<'a, E>
        |           ^^                                               ^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    427 - impl<'de, 'a, E> de::Deserializer<'de> for StrDeserializer<'a, E>
    427 + impl<'de, E> de::Deserializer<'de> for StrDeserializer<'_, E>
        |

    warning: the following explicit lifetimes could be elided: 'a
       --> serde/src/de/value.rs:461:11
        |
    461 | impl<'de, 'a, E> de::EnumAccess<'de> for StrDeserializer<'a, E>
        |           ^^                                             ^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    461 - impl<'de, 'a, E> de::EnumAccess<'de> for StrDeserializer<'a, E>
    461 + impl<'de, E> de::EnumAccess<'de> for StrDeserializer<'_, E>
        |

    warning: the following explicit lifetimes could be elided: 'a
       --> serde/src/de/value.rs:476:6
        |
    476 | impl<'a, E> Debug for StrDeserializer<'a, E> {
        |      ^^                               ^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    476 - impl<'a, E> Debug for StrDeserializer<'a, E> {
    476 + impl<E> Debug for StrDeserializer<'_, E> {
        |

    warning: the following explicit lifetimes could be elided: 'de
       --> serde/src/de/value.rs:555:6
        |
    555 | impl<'de, E> Debug for BorrowedStrDeserializer<'de, E> {
        |      ^^^                                       ^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    555 - impl<'de, E> Debug for BorrowedStrDeserializer<'de, E> {
    555 + impl<E> Debug for BorrowedStrDeserializer<'_, E> {
        |

    warning: the following explicit lifetimes could be elided: 'de
       --> serde/src/de/value.rs:586:6
        |
    586 | impl<'de, E> IntoDeserializer<'de, E> for String
        |      ^^^                      ^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    586 - impl<'de, E> IntoDeserializer<'de, E> for String
    586 + impl<E> IntoDeserializer<'_, E> for String
        |

    warning: the following explicit lifetimes could be elided: 'a
       --> serde/src/de/value.rs:680:6
        |
    680 | impl<'a, E> Clone for CowStrDeserializer<'a, E> {
        |      ^^                                  ^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    680 - impl<'a, E> Clone for CowStrDeserializer<'a, E> {
    680 + impl<E> Clone for CowStrDeserializer<'_, E> {
        |

    warning: the following explicit lifetimes could be elided: 'de
       --> serde/src/de/value.rs:691:6
        |
    691 | impl<'de, 'a, E> IntoDeserializer<'de, E> for Cow<'a, str>
        |      ^^^                          ^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    691 - impl<'de, 'a, E> IntoDeserializer<'de, E> for Cow<'a, str>
    691 + impl<'a, E> IntoDeserializer<'_, E> for Cow<'a, str>
        |

    warning: the following explicit lifetimes could be elided: 'a
       --> serde/src/de/value.rs:714:11
        |
    714 | impl<'de, 'a, E> de::Deserializer<'de> for CowStrDeserializer<'a, E>
        |           ^^                                                  ^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    714 - impl<'de, 'a, E> de::Deserializer<'de> for CowStrDeserializer<'a, E>
    714 + impl<'de, E> de::Deserializer<'de> for CowStrDeserializer<'_, E>
        |

    warning: the following explicit lifetimes could be elided: 'a
       --> serde/src/de/value.rs:752:11
        |
    752 | impl<'de, 'a, E> de::EnumAccess<'de> for CowStrDeserializer<'a, E>
        |           ^^                                                ^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    752 - impl<'de, 'a, E> de::EnumAccess<'de> for CowStrDeserializer<'a, E>
    752 + impl<'de, E> de::EnumAccess<'de> for CowStrDeserializer<'_, E>
        |

    warning: the following explicit lifetimes could be elided: 'a
       --> serde/src/de/value.rs:768:6
        |
    768 | impl<'a, E> Debug for CowStrDeserializer<'a, E> {
        |      ^^                                  ^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    768 - impl<'a, E> Debug for CowStrDeserializer<'a, E> {
    768 + impl<E> Debug for CowStrDeserializer<'_, E> {
        |

    warning: the following explicit lifetimes could be elided: 'de
       --> serde/src/de/value.rs:797:6
        |
    797 | impl<'de, 'a, E> IntoDeserializer<'de, E> for &'a [u8]
        |      ^^^                          ^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    797 - impl<'de, 'a, E> IntoDeserializer<'de, E> for &'a [u8]
    797 + impl<'a, E> IntoDeserializer<'_, E> for &'a [u8]
        |

    warning: the following explicit lifetimes could be elided: 'a
       --> serde/src/de/value.rs:808:11
        |
    808 | impl<'de, 'a, E> Deserializer<'de> for BytesDeserializer<'a, E>
        |           ^^                                             ^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    808 - impl<'de, 'a, E> Deserializer<'de> for BytesDeserializer<'a, E>
    808 + impl<'de, E> Deserializer<'de> for BytesDeserializer<'_, E>
        |

    warning: the following explicit lifetimes could be elided: 'a
       --> serde/src/de/value.rs:828:6
        |
    828 | impl<'a, E> Debug for BytesDeserializer<'a, E> {
        |      ^^                                 ^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    828 - impl<'a, E> Debug for BytesDeserializer<'a, E> {
    828 + impl<E> Debug for BytesDeserializer<'_, E> {
        |

    warning: the following explicit lifetimes could be elided: 'de
       --> serde/src/de/value.rs:876:6
        |
    876 | impl<'de, E> Debug for BorrowedBytesDeserializer<'de, E> {
        |      ^^^                                         ^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    876 - impl<'de, E> Debug for BorrowedBytesDeserializer<'de, E> {
    876 + impl<E> Debug for BorrowedBytesDeserializer<'_, E> {
        |

    warning: the following explicit lifetimes could be elided: 'de
        --> serde/src/de/value.rs:1101:6
         |
    1101 | impl<'de, I, E> MapDeserializer<'de, I, E>
         |      ^^^                        ^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    1101 - impl<'de, I, E> MapDeserializer<'de, I, E>
    1101 + impl<I, E> MapDeserializer<'_, I, E>
         |

    warning: the following explicit lifetimes could be elided: 'de
        --> serde/src/de/value.rs:1118:6
         |
    1118 | impl<'de, I, E> MapDeserializer<'de, I, E>
         |      ^^^                        ^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    1118 - impl<'de, I, E> MapDeserializer<'de, I, E>
    1118 + impl<I, E> MapDeserializer<'_, I, E>
         |

    warning: the following explicit lifetimes could be elided: 'de
        --> serde/src/de/value.rs:1141:6
         |
    1141 | impl<'de, I, E> MapDeserializer<'de, I, E>
         |      ^^^                        ^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    1141 - impl<'de, I, E> MapDeserializer<'de, I, E>
    1141 + impl<I, E> MapDeserializer<'_, I, E>
         |

    warning: the following explicit lifetimes could be elided: 'de
        --> serde/src/de/value.rs:1287:6
         |
    1287 | impl<'de, I, E> Clone for MapDeserializer<'de, I, E>
         |      ^^^                                  ^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    1287 - impl<'de, I, E> Clone for MapDeserializer<'de, I, E>
    1287 + impl<I, E> Clone for MapDeserializer<'_, I, E>
         |

    warning: the following explicit lifetimes could be elided: 'de
        --> serde/src/de/value.rs:1304:6
         |
    1304 | impl<'de, I, E> Debug for MapDeserializer<'de, I, E>
         |      ^^^                                  ^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    1304 - impl<'de, I, E> Debug for MapDeserializer<'de, I, E>
    1304 + impl<I, E> Debug for MapDeserializer<'_, I, E>
         |

    warning: the following explicit lifetimes could be elided: 'de
      --> serde/src/de/impls.rs:17:6
       |
    17 | impl<'de> Visitor<'de> for UnitVisitor {
       |      ^^^          ^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
       |
    17 - impl<'de> Visitor<'de> for UnitVisitor {
    17 + impl Visitor<'_> for UnitVisitor {
       |

    warning: the following explicit lifetimes could be elided: 'de
      --> serde/src/de/impls.rs:56:6
       |
    56 | impl<'de> Visitor<'de> for BoolVisitor {
       |      ^^^          ^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
       |
    56 - impl<'de> Visitor<'de> for BoolVisitor {
    56 + impl Visitor<'_> for BoolVisitor {
       |

    warning: the following explicit lifetimes could be elided: 'de
       --> serde/src/de/impls.rs:550:6
        |
    550 | impl<'de> Visitor<'de> for CharVisitor {
        |      ^^^          ^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    550 - impl<'de> Visitor<'de> for CharVisitor {
    550 + impl Visitor<'_> for CharVisitor {
        |

    warning: the following explicit lifetimes could be elided: 'de
       --> serde/src/de/impls.rs:596:6
        |
    596 | impl<'de> Visitor<'de> for StringVisitor {
        |      ^^^          ^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    596 - impl<'de> Visitor<'de> for StringVisitor {
    596 + impl Visitor<'_> for StringVisitor {
        |

    warning: the following explicit lifetimes could be elided: 'de, 'a
       --> serde/src/de/impls.rs:642:6
        |
    642 | impl<'a, 'de> Visitor<'de> for StringInPlaceVisitor<'a> {
        |      ^^  ^^^          ^^^                           ^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    642 - impl<'a, 'de> Visitor<'de> for StringInPlaceVisitor<'a> {
    642 + impl Visitor<'_> for StringInPlaceVisitor<'_> {
        |

    warning: the following explicit lifetimes could be elided: 'de
       --> serde/src/de/impls.rs:953:6
        |
    953 | impl<'de, T> Visitor<'de> for PhantomDataVisitor<T>
        |      ^^^             ^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    953 - impl<'de, T> Visitor<'de> for PhantomDataVisitor<T>
    953 + impl<T> Visitor<'_> for PhantomDataVisitor<T>
        |

    warning: the following explicit lifetimes could be elided: 'a
        --> serde/src/de/impls.rs:1195:14
         |
    1195 |         impl<'a, 'de, T> Visitor<'de> for VecInPlaceVisitor<'a, T>
         |              ^^                                             ^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    1195 -         impl<'a, 'de, T> Visitor<'de> for VecInPlaceVisitor<'a, T>
    1195 +         impl<'de, T> Visitor<'de> for VecInPlaceVisitor<'_, T>
         |

    warning: the following explicit lifetimes could be elided: 'de
        --> serde/src/de/impls.rs:1838:6
         |
    1838 | impl<'de> Visitor<'de> for PathBufVisitor {
         |      ^^^          ^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    1838 - impl<'de> Visitor<'de> for PathBufVisitor {
    1838 + impl Visitor<'_> for PathBufVisitor {
         |

    warning: the following explicit lifetimes could be elided: 'a
        --> serde/src/de/impls.rs:1991:11
         |
    1991 | impl<'de, 'a, T> Deserialize<'de> for Cow<'a, T>
         |           ^^                              ^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    1991 - impl<'de, 'a, T> Deserialize<'de> for Cow<'a, T>
    1991 + impl<'de, T> Deserialize<'de> for Cow<'_, T>
         |

    warning: the following explicit lifetimes could be elided: 'de
        --> serde/src/de/impls.rs:2161:22
         |
    2161 |                 impl<'de> Visitor<'de> for FieldVisitor {
         |                      ^^^          ^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    2161 -                 impl<'de> Visitor<'de> for FieldVisitor {
    2161 +                 impl Visitor<'_> for FieldVisitor {
         |

    warning: the following explicit lifetimes could be elided: 'de
        --> serde/src/de/impls.rs:2300:22
         |
    2300 |                 impl<'de> Visitor<'de> for FieldVisitor {
         |                      ^^^          ^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    2300 -                 impl<'de> Visitor<'de> for FieldVisitor {
    2300 +                 impl Visitor<'_> for FieldVisitor {
         |

    warning: the following explicit lifetimes could be elided: 'de
        --> serde/src/de/impls.rs:2501:18
         |
    2501 |             impl<'de> Visitor<'de> for FieldVisitor {
         |                  ^^^          ^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    2501 -             impl<'de> Visitor<'de> for FieldVisitor {
    2501 +             impl Visitor<'_> for FieldVisitor {
         |

    warning: the following explicit lifetimes could be elided: 'de
        --> serde/src/de/impls.rs:2658:18
         |
    2658 |             impl<'de> Visitor<'de> for FieldVisitor {
         |                  ^^^          ^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    2658 -             impl<'de> Visitor<'de> for FieldVisitor {
    2658 +             impl Visitor<'_> for FieldVisitor {
         |

    warning: the following explicit lifetimes could be elided: 'de
        --> serde/src/de/impls.rs:2796:18
         |
    2796 |             impl<'de> Visitor<'de> for FieldVisitor {
         |                  ^^^          ^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    2796 -             impl<'de> Visitor<'de> for FieldVisitor {
    2796 +             impl Visitor<'_> for FieldVisitor {
         |

    warning: the following explicit lifetimes could be elided: 'de
        --> serde/src/de/impls.rs:2907:22
         |
    2907 |                 impl<'de> Visitor<'de> for FieldVisitor {
         |                      ^^^          ^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    2907 -                 impl<'de> Visitor<'de> for FieldVisitor {
    2907 +                 impl Visitor<'_> for FieldVisitor {
         |

    warning: the following explicit lifetimes could be elided: 'de
        --> serde/src/de/impls.rs:3018:22
         |
    3018 |                 impl<'de> Visitor<'de> for FieldVisitor {
         |                      ^^^          ^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    3018 -                 impl<'de> Visitor<'de> for FieldVisitor {
    3018 +                 impl Visitor<'_> for FieldVisitor {
         |

    warning: the following explicit lifetimes could be elided: 'de
        --> serde/src/de/impls.rs:3166:6
         |
    3166 | impl<'de, T> Visitor<'de> for FromStrVisitor<T>
         |      ^^^             ^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    3166 - impl<'de, T> Visitor<'de> for FromStrVisitor<T>
    3166 + impl<T> Visitor<'_> for FromStrVisitor<T>
         |

    warning: the following explicit lifetimes could be elided: 'a
       --> serde/src/de/mod.rs:397:6
        |
    397 | impl<'a> fmt::Display for Unexpected<'a> {
        |      ^^                              ^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    397 - impl<'a> fmt::Display for Unexpected<'a> {
    397 + impl fmt::Display for Unexpected<'_> {
        |

    warning: the following explicit lifetimes could be elided: 'f, 'a
        --> serde/src/de/mod.rs:2309:14
         |
    2309 |         impl<'f, 'a> fmt::Write for LookForDecimalPoint<'f, 'a> {
         |              ^^  ^^                                     ^^  ^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    2309 -         impl<'f, 'a> fmt::Write for LookForDecimalPoint<'f, 'a> {
    2309 +         impl fmt::Write for LookForDecimalPoint<'_, '_> {
         |

    warning: the following explicit lifetimes could be elided: 'a
      --> serde/src/ser/fmt.rs:38:6
       |
    38 | impl<'a> Serializer for &mut fmt::Formatter<'a> {
       |      ^^                                     ^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
       |
    38 - impl<'a> Serializer for &mut fmt::Formatter<'a> {
    38 + impl Serializer for &mut fmt::Formatter<'_> {
       |

    warning: the following explicit lifetimes could be elided: 'a
      --> serde/src/ser/impls.rs:62:6
       |
    62 | impl<'a> Serialize for fmt::Arguments<'a> {
       |      ^^                               ^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
       |
    62 - impl<'a> Serialize for fmt::Arguments<'a> {
    62 + impl Serialize for fmt::Arguments<'_> {
       |

    warning: the following explicit lifetimes could be elided: 'a
      --> serde/src/format.rs:20:6
       |
    20 | impl<'a> Write for Buf<'a> {
       |      ^^                ^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
       |
    20 - impl<'a> Write for Buf<'a> {
    20 + impl Write for Buf<'_> {
       |

    warning: the following explicit lifetimes could be elided: 'de
       --> serde/src/private/de.rs:254:10
        |
    254 |     impl<'de> Content<'de> {
        |          ^^^          ^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    254 -     impl<'de> Content<'de> {
    254 +     impl Content<'_> {
        |

    warning: the following explicit lifetimes could be elided: 'de
       --> serde/src/private/de.rs:333:10
        |
    333 |     impl<'de> ContentVisitor<'de> {
        |          ^^^                 ^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    333 -     impl<'de> ContentVisitor<'de> {
    333 +     impl ContentVisitor<'_> {
        |

    warning: the following explicit lifetimes could be elided: 'de
       --> serde/src/private/de.rs:553:10
        |
    553 |     impl<'de> TagOrContentVisitor<'de> {
        |          ^^^                      ^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    553 -     impl<'de> TagOrContentVisitor<'de> {
    553 +     impl TagOrContentVisitor<'_> {
        |

    warning: the following explicit lifetimes could be elided: 'de
       --> serde/src/private/de.rs:937:10
        |
    937 |     impl<'de> Visitor<'de> for TagOrContentFieldVisitor {
        |          ^^^          ^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    937 -     impl<'de> Visitor<'de> for TagOrContentFieldVisitor {
    937 +     impl Visitor<'_> for TagOrContentFieldVisitor {
        |

    warning: the following explicit lifetimes could be elided: 'de
        --> serde/src/private/de.rs:1014:10
         |
    1014 |     impl<'de> Visitor<'de> for TagContentOtherFieldVisitor {
         |          ^^^          ^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    1014 -     impl<'de> Visitor<'de> for TagContentOtherFieldVisitor {
    1014 +     impl Visitor<'_> for TagContentOtherFieldVisitor {
         |

    warning: the following explicit lifetimes could be elided: 'a
        --> serde/src/private/de.rs:1652:10
         |
    1652 |     impl<'a, 'de, E> ContentRefDeserializer<'a, 'de, E>
         |          ^^                                 ^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    1652 -     impl<'a, 'de, E> ContentRefDeserializer<'a, 'de, E>
    1652 +     impl<'de, E> ContentRefDeserializer<'_, 'de, E>
         |

    warning: the following explicit lifetimes could be elided: 'a
        --> serde/src/private/de.rs:1735:15
         |
    1735 |     impl<'de, 'a, E> Deserializer<'de> for ContentRefDeserializer<'a, 'de, E>
         |               ^^                                                  ^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    1735 -     impl<'de, 'a, E> Deserializer<'de> for ContentRefDeserializer<'a, 'de, E>
    1735 +     impl<'de, E> Deserializer<'de> for ContentRefDeserializer<'_, 'de, E>
         |

    warning: the following explicit lifetimes could be elided: 'a
        --> serde/src/private/de.rs:2162:15
         |
    2162 |     impl<'de, 'a, E> de::VariantAccess<'de> for VariantRefDeserializer<'a, 'de, E>
         |               ^^                                                       ^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    2162 -     impl<'de, 'a, E> de::VariantAccess<'de> for VariantRefDeserializer<'a, 'de, E>
    2162 +     impl<'de, E> de::VariantAccess<'de> for VariantRefDeserializer<'_, 'de, E>
         |

    warning: the following explicit lifetimes could be elided: 'a
        --> serde/src/private/de.rs:2259:15
         |
    2259 |     impl<'de, 'a, E> de::IntoDeserializer<'de, E> for ContentRefDeserializer<'a, 'de, E>
         |               ^^                                                             ^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    2259 -     impl<'de, 'a, E> de::IntoDeserializer<'de, E> for ContentRefDeserializer<'a, 'de, E>
    2259 +     impl<'de, E> de::IntoDeserializer<'de, E> for ContentRefDeserializer<'_, 'de, E>
         |

    warning: the following explicit lifetimes could be elided: 'a
        --> serde/src/private/de.rs:2288:15
         |
    2288 |     impl<'de, 'a> Visitor<'de> for InternallyTaggedUnitVisitor<'a> {
         |               ^^                                               ^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    2288 -     impl<'de, 'a> Visitor<'de> for InternallyTaggedUnitVisitor<'a> {
    2288 +     impl<'de> Visitor<'de> for InternallyTaggedUnitVisitor<'_> {
         |

    warning: the following explicit lifetimes could be elided: 'a, 'de
        --> serde/src/private/de.rs:2333:10
         |
    2333 |     impl<'de, 'a> Visitor<'de> for UntaggedUnitVisitor<'a> {
         |          ^^^  ^^          ^^^                          ^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    2333 -     impl<'de, 'a> Visitor<'de> for UntaggedUnitVisitor<'a> {
    2333 +     impl Visitor<'_> for UntaggedUnitVisitor<'_> {
         |

    warning: the following explicit lifetimes could be elided: 'a
        --> serde/src/private/de.rs:2396:11
         |
    2396 | impl<'de, 'a, E> Deserializer<'de> for StrDeserializer<'a, E>
         |           ^^                                           ^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    2396 - impl<'de, 'a, E> Deserializer<'de> for StrDeserializer<'a, E>
    2396 + impl<'de, E> Deserializer<'de> for StrDeserializer<'_, E>
         |

    warning: the following explicit lifetimes could be elided: 'a, 'de
        --> serde/src/private/de.rs:2498:6
         |
    2498 | impl<'a, 'de, E> FlatMapDeserializer<'a, 'de, E>
         |      ^^  ^^^                         ^^  ^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    2498 - impl<'a, 'de, E> FlatMapDeserializer<'a, 'de, E>
    2498 + impl<E> FlatMapDeserializer<'_, '_, E>
         |

    warning: the following explicit lifetimes could be elided: 'a
        --> serde/src/private/de.rs:2522:6
         |
    2522 | impl<'a, 'de, E> Deserializer<'de> for FlatMapDeserializer<'a, 'de, E>
         |      ^^                                                    ^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    2522 - impl<'a, 'de, E> Deserializer<'de> for FlatMapDeserializer<'a, 'de, E>
    2522 + impl<'de, E> Deserializer<'de> for FlatMapDeserializer<'_, 'de, E>
         |

    warning: the following explicit lifetimes could be elided: 'a
        --> serde/src/private/de.rs:2658:6
         |
    2658 | impl<'a, 'de, E> MapAccess<'de> for FlatMapAccess<'a, 'de, E>
         |      ^^                                           ^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    2658 - impl<'a, 'de, E> MapAccess<'de> for FlatMapAccess<'a, 'de, E>
    2658 + impl<'de, E> MapAccess<'de> for FlatMapAccess<'_, 'de, E>
         |

    warning: the following explicit lifetimes could be elided: 'a
        --> serde/src/private/de.rs:2702:6
         |
    2702 | impl<'a, 'de, E> MapAccess<'de> for FlatStructAccess<'a, 'de, E>
         |      ^^                                              ^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    2702 - impl<'a, 'de, E> MapAccess<'de> for FlatStructAccess<'a, 'de, E>
    2702 + impl<'de, E> MapAccess<'de> for FlatStructAccess<'_, 'de, E>
         |

    warning: the following explicit lifetimes could be elided: 'a
     --> serde/src/de/seed.rs:8:6
      |
    8 | impl<'a, 'de, T> DeserializeSeed<'de> for InPlaceSeed<'a, T>
      |      ^^                                               ^^
      |
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
      |
    8 - impl<'a, 'de, T> DeserializeSeed<'de> for InPlaceSeed<'a, T>
    8 + impl<'de, T> DeserializeSeed<'de> for InPlaceSeed<'_, T>
      |

    warning: the following explicit lifetimes could be elided: 'a
       --> serde_derive/src/internals/case.rs:124:6
        |
    124 | impl<'a> Display for ParseError<'a> {
        |      ^^                         ^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
        = note: `-W clippy::needless-lifetimes` implied by `-W clippy::all`
        = help: to override `-W clippy::all` add `#[allow(clippy::needless_lifetimes)]`
    help: elide the lifetimes
        |
    124 - impl<'a> Display for ParseError<'a> {
    124 + impl Display for ParseError<'_> {
        |

    warning: the following explicit lifetimes could be elided: 'a
        --> serde_derive/src/de.rs:3042:6
         |
    3042 | impl<'a> ToTokens for DeImplGenerics<'a> {
         |      ^^                              ^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    3042 - impl<'a> ToTokens for DeImplGenerics<'a> {
    3042 + impl ToTokens for DeImplGenerics<'_> {
         |

    warning: the following explicit lifetimes could be elided: 'a
        --> serde_derive/src/de.rs:3124:6
         |
    3124 | impl<'a> ToTokens for DeTypeGenerics<'a> {
         |      ^^                              ^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    3124 - impl<'a> ToTokens for DeTypeGenerics<'a> {
    3124 + impl ToTokens for DeTypeGenerics<'_> {
         |

    warning: the following explicit lifetimes could be elided: 'a
      --> test_suite/tests/test_serde_path.rs:15:10
       |
    15 |     impl<'a> AssertNotSerdeDeserialize<'a> for Foo {}
       |          ^^                            ^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
       = note: `-W clippy::needless-lifetimes` implied by `-W clippy::all`
       = help: to override `-W clippy::all` add `#[allow(clippy::needless_lifetimes)]`
    help: elide the lifetimes
       |
    15 -     impl<'a> AssertNotSerdeDeserialize<'a> for Foo {}
    15 +     impl AssertNotSerdeDeserialize<'_> for Foo {}
       |
2024-10-07 21:02:22 +02:00
David Tolnay
8e1ae68569
Resolve some needless_lifetimes clippy lints
warning: the following explicit lifetimes could be elided: 'a
       --> serde/src/de/mod.rs:489:6
        |
    489 | impl<'a> Expected for &'a str {
        |      ^^                ^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    489 - impl<'a> Expected for &'a str {
    489 + impl Expected for &str {
        |

    warning: the following explicit lifetimes could be elided: 'a
       --> serde/src/de/mod.rs:495:6
        |
    495 | impl<'a> Display for Expected + 'a {
        |      ^^                         ^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
        |
    495 - impl<'a> Display for Expected + 'a {
    495 + impl Display for Expected + '_ {
        |

    warning: the following explicit lifetimes could be elided: 'a
        --> serde/src/de/mod.rs:1744:11
         |
    1744 | impl<'de, 'a, A> SeqAccess<'de> for &'a mut A
         |           ^^                         ^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    1744 - impl<'de, 'a, A> SeqAccess<'de> for &'a mut A
    1744 + impl<'de, A> SeqAccess<'de> for &mut A
         |

    warning: the following explicit lifetimes could be elided: 'a
        --> serde/src/de/mod.rs:1897:11
         |
    1897 | impl<'de, 'a, A> MapAccess<'de> for &'a mut A
         |           ^^                         ^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
         |
    1897 - impl<'de, 'a, A> MapAccess<'de> for &'a mut A
    1897 + impl<'de, A> MapAccess<'de> for &mut A
         |

    warning: the following explicit lifetimes could be elided: 'a, 'b
      --> serde/src/ser/fmt.rs:38:6
       |
    38 | impl<'a, 'b> Serializer for &'a mut fmt::Formatter<'b> {
       |      ^^  ^^                  ^^                    ^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
       |
    38 - impl<'a, 'b> Serializer for &'a mut fmt::Formatter<'b> {
    38 + impl Serializer for &mut fmt::Formatter<'_> {
       |

    warning: the following explicit lifetimes could be elided: 'a
      --> serde_derive/src/internals/symbol.rs:49:6
       |
    49 | impl<'a> PartialEq<Symbol> for &'a Ident {
       |      ^^                         ^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
       |
    49 - impl<'a> PartialEq<Symbol> for &'a Ident {
    49 + impl PartialEq<Symbol> for &Ident {
       |

    warning: the following explicit lifetimes could be elided: 'a
      --> serde_derive/src/internals/symbol.rs:61:6
       |
    61 | impl<'a> PartialEq<Symbol> for &'a Path {
       |      ^^                         ^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    help: elide the lifetimes
       |
    61 - impl<'a> PartialEq<Symbol> for &'a Path {
    61 + impl PartialEq<Symbol> for &Path {
       |
2024-10-07 20:58:23 +02:00
David Tolnay
89c4b02bf3
Release 1.0.210 2024-09-06 11:17:20 -07:00
David Tolnay
30752ac4ff
Release 1.0.209 2024-08-23 20:29:05 -07:00
David Tolnay
026e91a68c
Release 1.0.208 2024-08-15 08:41:27 -07:00
David Tolnay
1b4da41f97
Release 1.0.207 2024-08-12 13:06:46 -07:00
David Tolnay
f61d452814
Touch up PR 2795 2024-08-12 13:03:10 -07:00
Mingun
77a6a9d4e1 Take into account only not skipped flatten fields when choose serialization form
Consequence: `FlattenSkipSerializing`
- uses `serialize_struct` instead of `serialize_map`
2024-08-11 20:12:09 +05:00
Mingun
547d843cca Remove dead code - serialize_struct_as_map always called when cattrs.has_flatten()==true 2024-08-11 20:12:08 +05:00
Mingun
005cb84593 Fail with an understandable message is number of fields for serialization is too many 2024-08-11 20:12:07 +05:00
Mingun
fd5b5e9aa5 Correctly calculate has_flatten attribute in all cases for deserialization
Consequence: `FlattenSkipDeserializing[DenyUnknown]`
- does not collect data in Field, because do not read them anyway
- gets `deserialize_in_place` method
- gets ability to deserialize from sequence (visit_seq method)
- uses `deserialize_struct` instead of `deserialize_map`
2024-08-11 20:01:33 +05:00
Mingun
0647a7c1fe Fix creating and filling a collections that was not read 2024-08-11 20:01:00 +05:00
David Tolnay
85c73ef8de
Release 1.0.206 2024-08-11 00:08:37 -07:00
David Tolnay
e52b7b380f
Touch up PR 2567 2024-08-11 00:05:56 -07:00
Mingun
b4ec2595c9 Correctly process flatten fields in enum variants
- Fix incorrect deserialization of variants that doesn't contain flatten field when other contains
- Fix a panic when deriving `Deserialize` for an enum with tuple and struct with flatten field

Fixes (2):
    regression::issue2565::simple_variant
    regression::issue1904 (compilation)
2024-08-09 19:59:23 +05:00
David Tolnay
9b868ef831
Release 1.0.205 2024-08-07 18:53:21 -07:00
David Tolnay
32958dec3b
Skip collecting unmatched fields in variants that do not use flatten 2024-08-07 18:43:47 -07:00
David Tolnay
18dcae0a77
Release 1.0.204 2024-07-06 13:38:01 -07:00
David Tolnay
d5bc546ca5
Release 1.0.203 2024-05-25 10:43:27 -07:00
David Tolnay
9e32a40b1c
Release 1.0.202 2024-05-15 00:42:49 -07:00
David Tolnay
f6ab0bc56f
Provide public access to RenameAllRules in serde_derive_internals 2024-05-15 00:30:55 -07:00
David Tolnay
48cc2a6327
Replace use of a syn From impl
The From impls may be going away in the next version of syn.
2024-05-14 23:02:28 -07:00
David Tolnay
3202a6858a
Skip rerunning build script on library code changes 2024-05-08 21:59:41 -07:00
David Tolnay
b4f1bc16ff
Release 1.0.201 2024-05-07 17:02:11 -07:00
David Tolnay
220ca0ca9d
Resolve unexpected_cfgs warning
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
2024-05-07 16:55:01 -07:00
David Tolnay
cc865ac523
Release 1.0.200 2024-05-01 08:58:52 -07:00
David Tolnay
1477028717
Release 1.0.199 2024-04-26 21:22:11 -07:00
David Tolnay
c4fb923335
Release 1.0.198 2024-04-16 14:18:01 -07:00
David Tolnay
5b24f88e73
Resolve legacy_numeric_constants clippy lints
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),
         |                             ~~~
2024-04-05 19:19:14 -07:00
David Tolnay
3f43fca90d
Fix warning on no edition set in serde_derive
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`
2024-03-11 20:18:10 -07:00
David Tolnay
5fa711d75d
Release 1.0.197 2024-02-19 16:22:07 -08:00
David Tolnay
ede9762a58
Release 1.0.196 2024-01-26 14:00:35 -08:00
David Tolnay
29d9f69399
Fix workspace.dependencies default-features future compat warning
warning: serde_derive_internals/Cargo.toml: `default-features` is
    ignored for syn, since `default-features` was not specified for
    `workspace.dependencies.syn`, this could become a hard error in the
    future
2024-01-26 13:36:03 -08:00
Rodolfo P A
dd619630a3 Adding workspace dependencies 2024-01-23 12:53:29 +00:00
David Tolnay
03eec42c33
Release 1.0.195 2024-01-05 18:33:24 -08:00
David Tolnay
6502b31316
Fix new dead_code warning in tuple struct and tuple variant remote defs 2024-01-05 18:26:24 -08:00
David Tolnay
7c65a9dc0e
Pick up changes to non_exhaustive_omitted_patterns lint
warning: the lint level must be set on the whole match
        --> serde_derive/src/internals/attr.rs:1855:9
         |
    1854 |         #[cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
         |                                                ------------------------------- remove this attribute
    1855 |         _ => {}
         |         ^
         |
         = help: it no longer has any effect to set the lint level on an individual match arm
    help: set the lint level on the whole match
         |
    1796 +     #[deny(non_exhaustive_omitted_patterns)]
    1797 |     match ty {
         |

    warning: the lint level must be set on the whole match
       --> serde_derive/src/internals/receiver.rs:151:13
        |
    150 |             #[cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
        |                                                    ------------------------------- remove this attribute
    151 |             _ => {}
        |             ^
        |
        = help: it no longer has any effect to set the lint level on an individual match arm
    help: set the lint level on the whole match
        |
    109 +         #[deny(non_exhaustive_omitted_patterns)]
    110 |         match ty {
        |

    warning: the lint level must be set on the whole match
       --> serde_derive/src/internals/receiver.rs:188:25
        |
    187 |                         #[cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
        |                                                                ------------------------------- remove this attribute
    188 |                         _ => {}
        |                         ^
        |
        = help: it no longer has any effect to set the lint level on an individual match arm
    help: set the lint level on the whole match
        |
    180 +                     #[deny(non_exhaustive_omitted_patterns)]
    181 |                     match arg {
        |

    warning: the lint level must be set on the whole match
       --> serde_derive/src/internals/receiver.rs:213:13
        |
    212 |             #[cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
        |                                                    ------------------------------- remove this attribute
    213 |             _ => {}
        |             ^
        |
        = help: it no longer has any effect to set the lint level on an individual match arm
    help: set the lint level on the whole match
        |
    209 +         #[deny(non_exhaustive_omitted_patterns)]
    210 |         match bound {
        |

    warning: the lint level must be set on the whole match
       --> serde_derive/src/internals/receiver.rs:239:21
        |
    238 |                     #[cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
        |                                                            ------------------------------- remove this attribute
    239 |                     _ => {}
        |                     ^
        |
        = help: it no longer has any effect to set the lint level on an individual match arm
    help: set the lint level on the whole match
        |
    230 +                 #[deny(non_exhaustive_omitted_patterns)]
    231 |                 match predicate {
        |

    warning: the lint level must be set on the whole match
       --> serde_derive/src/bound.rs:185:17
        |
    184 |                 #[cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
        |                                                        ------------------------------- remove this attribute
    185 |                 _ => {}
        |                 ^
        |
        = help: it no longer has any effect to set the lint level on an individual match arm
    help: set the lint level on the whole match
        |
    146 +             #[deny(non_exhaustive_omitted_patterns)]
    147 |             match ty {
        |

    warning: the lint level must be set on the whole match
       --> serde_derive/src/bound.rs:209:29
        |
    207 | ...                       deny(non_exhaustive_omitted_patterns)
        |                                ------------------------------- remove this attribute
    208 | ...                   )]
    209 | ...                   _ => {}
        |                       ^
        |
        = help: it no longer has any effect to set the lint level on an individual match arm
    help: set the lint level on the whole match
        |
    198 +                         #[deny(non_exhaustive_omitted_patterns)]
    199 |                         match arg {
        |

    warning: the lint level must be set on the whole match
       --> serde_derive/src/bound.rs:234:17
        |
    233 |                 #[cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
        |                                                        ------------------------------- remove this attribute
    234 |                 _ => {}
        |                 ^
        |
        = help: it no longer has any effect to set the lint level on an individual match arm
    help: set the lint level on the whole match
        |
    230 +             #[deny(non_exhaustive_omitted_patterns)]
    231 |             match bound {
        |
2024-01-03 18:38:58 -08:00
David Tolnay
8bc71def55
Fill in omitted patterns for GenericArguments match
error: some variants are not matched explicitly
        --> serde_derive/src/internals/attr.rs:1823:31
         |
    1823 |                         match arg {
         |                               ^^^ patterns `&GenericArgument::Const(_)`, `&GenericArgument::AssocConst(_)` and `&GenericArgument::Constraint(_)` not covered
         |
         = help: ensure that all variants are matched explicitly by adding the suggested match arms
         = note: the matched value is of type `&GenericArgument` and the `non_exhaustive_omitted_patterns` attribute was found
    note: the lint level is defined here
        --> serde_derive/src/internals/attr.rs:1797:49
         |
    1797 |         #![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
         |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-03 18:38:58 -08:00
David Tolnay
d2d977a6c6
Release 1.0.194 2024-01-01 23:07:27 -08:00
David Tolnay
a9a6ee9d7f
Pull in proc-macro2 sccache fix 2024-01-01 23:03:34 -08:00
David Tolnay
3d6a789562
Remove option_if_let_else clippy suppression 2023-12-30 14:46:51 -08:00
David Tolnay
44613c7d01
Release 1.0.193 2023-11-20 17:34:20 -08:00
David Tolnay
4676abdc9e
Release 1.0.192 2023-11-06 18:49:17 -08:00
David Tolnay
35700eb23e
Merge pull request #2646 from robsdedude/fix/2643/allow-tag-field-in-untagged
Allow internal tag field in untagged variant
2023-11-06 18:48:46 -08:00
David Tolnay
59892e7b58
Release 1.0.191 2023-11-06 11:30:27 -08:00
Robsdedude
589549d7e6 Allow internal tag field in untagged variant 2023-11-06 12:14:49 +01:00
David Tolnay
edb1a586d8
Release 1.0.190 2023-10-25 20:05:13 -07:00
David Tolnay
8de84b7ca3
Resolve get_first clippy lint
warning: accessing first element with `variant.fields.get(0)`
        --> serde_derive/src/de.rs:1843:27
         |
    1843 |             let default = variant.fields.get(0).map(|field| {
         |                           ^^^^^^^^^^^^^^^^^^^^^ help: try: `variant.fields.first()`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
         = note: `-W clippy::get-first` implied by `-W clippy::all`
         = help: to override `-W clippy::all` add `#[allow(clippy::get_first)]`

    warning: accessing first element with `variant.fields.get(0)`
        --> serde_derive/src/de.rs:1888:27
         |
    1888 |             let default = variant.fields.get(0).map(|field| {
         |                           ^^^^^^^^^^^^^^^^^^^^^ help: try: `variant.fields.first()`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
2023-10-21 22:01:10 -07:00
David Tolnay
9cdf332029
Remove 'remember to update' reminder from Cargo.toml 2023-10-17 21:05:31 -07:00
David Tolnay
e94fc65f01
Release 1.0.189 2023-10-12 19:20:43 -07:00