Skip to content

[pull] master from serde-rs:master#32

Open
pull[bot] wants to merge 1304 commits into
mesalock-linux:masterfrom
serde-rs:master
Open

[pull] master from serde-rs:master#32
pull[bot] wants to merge 1304 commits into
mesalock-linux:masterfrom
serde-rs:master

Conversation

@pull

@pull pull Bot commented Dec 21, 2020

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

Mingun and others added 22 commits October 25, 2024 19:18
- Check that alias is not the same as name of other field (it still can be the name of owning field/variant)
- Check that aliases are unique, i. e. two different fields does not use the same alias
Implement `IntoDeserializer` for all `Deserializer`s in `serde::de::value` module
Add checks for conflicts for aliases
This step has been failing way more than reasonable across my various repos.

    With the provided path, there will be 1 file uploaded
    Artifact name is valid!
    Root directory input is valid!
    Attempt 1 of 5 failed with error: Request timeout: /twirp/github.actions.results.api.v1.ArtifactService/CreateArtifact. Retrying request in 3000 ms...
    Attempt 2 of 5 failed with error: Request timeout: /twirp/github.actions.results.api.v1.ArtifactService/CreateArtifact. Retrying request in 6029 ms...
    Attempt 3 of 5 failed with error: Request timeout: /twirp/github.actions.results.api.v1.ArtifactService/CreateArtifact. Retrying request in 8270 ms...
    Attempt 4 of 5 failed with error: Request timeout: /twirp/github.actions.results.api.v1.ArtifactService/CreateArtifact. Retrying request in 12577 ms...
    Error: Failed to CreateArtifact: Failed to make request after 5 attempts: Request timeout: /twirp/github.actions.results.api.v1.ArtifactService/CreateArtifact
Produce unreachable_patterns warning when deserialization names collide
Produce a separate warning for every colliding name
This reverts commit 951ca5a.
Revert the colliding aliases hard error (PRs #2562 & #2853)
    warning: this `match` expression can be replaced with `?`
       --> serde/build.rs:111:17
        |
    111 |       let rustc = match env::var_os("RUSTC") {
        |  _________________^
    112 | |         Some(rustc) => rustc,
    113 | |         None => return None,
    114 | |     };
        | |_____^ help: try instead: `env::var_os("RUSTC")?`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark
        = note: `-W clippy::question-mark` implied by `-W clippy::all`
        = help: to override `-W clippy::all` add `#[allow(clippy::question_mark)]`

    warning: this `match` expression can be replaced with `?`
       --> serde/build.rs:131:16
        |
    131 |       let next = match pieces.next() {
        |  ________________^
    132 | |         Some(next) => next,
    133 | |         None => return None,
    134 | |     };
        | |_____^ help: try instead: `pieces.next()?`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark
dtolnay and others added 30 commits November 20, 2025 10:19
Signed-off-by: xibeiyoumian <xibeiyoumian@outlook.com>
chore: improve code comments clarity
…ilter_map

serde_derive: rewrite .iter().filter_map() with less llvm-lines
…ound_llvml

serde_derive: rewrite with_bound without filter/chain/vec allocation
    warning: consider adding a `;` to the last statement for consistent formatting
       --> serde_derive/src/pretend.rs:124:17
        |
    124 |                 patterns.push(quote!(#type_ident::#variant_ident { #(#members: #placeholders),* }))
        |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `patterns.push(quote!(#type_ident::#variant_ident { #(#members: #placeholders),* }));`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
        = note: `-W clippy::semicolon-if-nothing-returned` implied by `-W clippy::pedantic`
        = help: to override `-W clippy::pedantic` add `#[allow(clippy::semicolon_if_nothing_returned)]`
typo: tokenenizable to tokenizable
…er_enumerate

serde_derive: rewrite fields_from_ast with less llvm-lines
serde_derive: reduce llvm-lines in ser.rs, reuse fn field_i
    warning: redundant closure
       --> serde_derive/src/ser.rs:461:65
        |
    461 |                 let field_names = (0..variant.fields.len()).map(|i| field_i(i));
        |                                                                 ^^^^^^^^^^^^^^ help: replace the closure with the function itself: `field_i`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
        = note: `-W clippy::redundant-closure` implied by `-W clippy::all`
        = help: to override `-W clippy::all` add `#[allow(clippy::redundant_closure)]`
    warning: feature `never_type` is declared but not used
       --> serde/src/lib.rs:108:43
        |
    108 | #![cfg_attr(feature = "unstable", feature(never_type))]
        |                                           ^^^^^^^^^^
        |
        = note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default
    warning: borrow of a mutable reference
        --> serde_core/src/de/impls.rs:1054:32
         |
    1054 |                           $clear(&mut self.0);
         |                                  ^^^^^
    ...
    1076 | / seq_impl!(
    1077 | |     #[cfg(any(feature = "std", feature = "alloc"))]
    1078 | |     #[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
    1079 | |     BinaryHeap<T: Ord>,
    ...    |
    1084 | |     BinaryHeap::push
    1085 | | );
         | |_- in this macro invocation
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_mut
         = note: `-W clippy::mut-mut` implied by `-W clippy::pedantic`
         = help: to override `-W clippy::pedantic` add `#[allow(clippy::mut_mut)]`
         = note: this warning originates in the macro `seq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
    help: reborrow instead
         |
    1054 |                         $clear(&mut *self.0);
         |                                     +

    warning: borrow of a mutable reference
        --> serde_core/src/de/impls.rs:1055:34
         |
    1055 |                           $reserve(&mut self.0, size_hint::cautious::<T>($access.size_hint()));
         |                                    ^^^^^
    ...
    1076 | / seq_impl!(
    1077 | |     #[cfg(any(feature = "std", feature = "alloc"))]
    1078 | |     #[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
    1079 | |     BinaryHeap<T: Ord>,
    ...    |
    1084 | |     BinaryHeap::push
    1085 | | );
         | |_- in this macro invocation
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_mut
         = note: this warning originates in the macro `seq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
    help: reborrow instead
         |
    1055 |                         $reserve(&mut *self.0, size_hint::cautious::<T>($access.size_hint()));
         |                                       +

    warning: borrow of a mutable reference
        --> serde_core/src/de/impls.rs:1059:37
         |
    1059 |                               $insert(&mut self.0, value);
         |                                       ^^^^^
    ...
    1076 | / seq_impl!(
    1077 | |     #[cfg(any(feature = "std", feature = "alloc"))]
    1078 | |     #[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
    1079 | |     BinaryHeap<T: Ord>,
    ...    |
    1084 | |     BinaryHeap::push
    1085 | | );
         | |_- in this macro invocation
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_mut
         = note: this warning originates in the macro `seq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
    help: reborrow instead
         |
    1059 |                             $insert(&mut *self.0, value);
         |                                          +

    warning: borrow of a mutable reference
        --> serde_core/src/de/impls.rs:1054:32
         |
    1054 |                           $clear(&mut self.0);
         |                                  ^^^^^
    ...
    1087 | / seq_impl!(
    1088 | |     #[cfg(any(feature = "std", feature = "alloc"))]
    1089 | |     #[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
    1090 | |     BTreeSet<T: Eq + Ord>,
    ...    |
    1095 | |     BTreeSet::insert
    1096 | | );
         | |_- in this macro invocation
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_mut
         = note: this warning originates in the macro `seq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
    help: reborrow instead
         |
    1054 |                         $clear(&mut *self.0);
         |                                     +

    warning: borrow of a mutable reference
        --> serde_core/src/de/impls.rs:1055:34
         |
    1055 |                           $reserve(&mut self.0, size_hint::cautious::<T>($access.size_hint()));
         |                                    ^^^^^
    ...
    1087 | / seq_impl!(
    1088 | |     #[cfg(any(feature = "std", feature = "alloc"))]
    1089 | |     #[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
    1090 | |     BTreeSet<T: Eq + Ord>,
    ...    |
    1095 | |     BTreeSet::insert
    1096 | | );
         | |_- in this macro invocation
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_mut
         = note: this warning originates in the macro `seq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
    help: reborrow instead
         |
    1055 |                         $reserve(&mut *self.0, size_hint::cautious::<T>($access.size_hint()));
         |                                       +

    warning: borrow of a mutable reference
        --> serde_core/src/de/impls.rs:1059:37
         |
    1059 |                               $insert(&mut self.0, value);
         |                                       ^^^^^
    ...
    1087 | / seq_impl!(
    1088 | |     #[cfg(any(feature = "std", feature = "alloc"))]
    1089 | |     #[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
    1090 | |     BTreeSet<T: Eq + Ord>,
    ...    |
    1095 | |     BTreeSet::insert
    1096 | | );
         | |_- in this macro invocation
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_mut
         = note: this warning originates in the macro `seq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
    help: reborrow instead
         |
    1059 |                             $insert(&mut *self.0, value);
         |                                          +

    warning: borrow of a mutable reference
        --> serde_core/src/de/impls.rs:1054:32
         |
    1054 |                           $clear(&mut self.0);
         |                                  ^^^^^
    ...
    1098 | / seq_impl!(
    1099 | |     #[cfg(any(feature = "std", feature = "alloc"))]
    1100 | |     #[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
    1101 | |     LinkedList<T>,
    ...    |
    1106 | |     LinkedList::push_back
    1107 | | );
         | |_- in this macro invocation
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_mut
         = note: this warning originates in the macro `seq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
    help: reborrow instead
         |
    1054 |                         $clear(&mut *self.0);
         |                                     +

    warning: borrow of a mutable reference
        --> serde_core/src/de/impls.rs:1055:34
         |
    1055 |                           $reserve(&mut self.0, size_hint::cautious::<T>($access.size_hint()));
         |                                    ^^^^^
    ...
    1098 | / seq_impl!(
    1099 | |     #[cfg(any(feature = "std", feature = "alloc"))]
    1100 | |     #[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
    1101 | |     LinkedList<T>,
    ...    |
    1106 | |     LinkedList::push_back
    1107 | | );
         | |_- in this macro invocation
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_mut
         = note: this warning originates in the macro `seq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
    help: reborrow instead
         |
    1055 |                         $reserve(&mut *self.0, size_hint::cautious::<T>($access.size_hint()));
         |                                       +

    warning: borrow of a mutable reference
        --> serde_core/src/de/impls.rs:1059:37
         |
    1059 |                               $insert(&mut self.0, value);
         |                                       ^^^^^
    ...
    1098 | / seq_impl!(
    1099 | |     #[cfg(any(feature = "std", feature = "alloc"))]
    1100 | |     #[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
    1101 | |     LinkedList<T>,
    ...    |
    1106 | |     LinkedList::push_back
    1107 | | );
         | |_- in this macro invocation
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_mut
         = note: this warning originates in the macro `seq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
    help: reborrow instead
         |
    1059 |                             $insert(&mut *self.0, value);
         |                                          +

    warning: borrow of a mutable reference
        --> serde_core/src/de/impls.rs:1054:32
         |
    1054 |                           $clear(&mut self.0);
         |                                  ^^^^^
    ...
    1109 | / seq_impl!(
    1110 | |     #[cfg(feature = "std")]
    1111 | |     #[cfg_attr(docsrs, doc(cfg(feature = "std")))]
    1112 | |     HashSet<T: Eq + Hash, S: BuildHasher + Default>,
    ...    |
    1117 | |     HashSet::insert
    1118 | | );
         | |_- in this macro invocation
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_mut
         = note: this warning originates in the macro `seq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
    help: reborrow instead
         |
    1054 |                         $clear(&mut *self.0);
         |                                     +

    warning: borrow of a mutable reference
        --> serde_core/src/de/impls.rs:1055:34
         |
    1055 |                           $reserve(&mut self.0, size_hint::cautious::<T>($access.size_hint()));
         |                                    ^^^^^
    ...
    1109 | / seq_impl!(
    1110 | |     #[cfg(feature = "std")]
    1111 | |     #[cfg_attr(docsrs, doc(cfg(feature = "std")))]
    1112 | |     HashSet<T: Eq + Hash, S: BuildHasher + Default>,
    ...    |
    1117 | |     HashSet::insert
    1118 | | );
         | |_- in this macro invocation
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_mut
         = note: this warning originates in the macro `seq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
    help: reborrow instead
         |
    1055 |                         $reserve(&mut *self.0, size_hint::cautious::<T>($access.size_hint()));
         |                                       +

    warning: borrow of a mutable reference
        --> serde_core/src/de/impls.rs:1059:37
         |
    1059 |                               $insert(&mut self.0, value);
         |                                       ^^^^^
    ...
    1109 | / seq_impl!(
    1110 | |     #[cfg(feature = "std")]
    1111 | |     #[cfg_attr(docsrs, doc(cfg(feature = "std")))]
    1112 | |     HashSet<T: Eq + Hash, S: BuildHasher + Default>,
    ...    |
    1117 | |     HashSet::insert
    1118 | | );
         | |_- in this macro invocation
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_mut
         = note: this warning originates in the macro `seq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
    help: reborrow instead
         |
    1059 |                             $insert(&mut *self.0, value);
         |                                          +

    warning: borrow of a mutable reference
        --> serde_core/src/de/impls.rs:1054:32
         |
    1054 |                           $clear(&mut self.0);
         |                                  ^^^^^
    ...
    1120 | / seq_impl!(
    1121 | |     #[cfg(any(feature = "std", feature = "alloc"))]
    1122 | |     #[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
    1123 | |     VecDeque<T>,
    ...    |
    1128 | |     VecDeque::push_back
    1129 | | );
         | |_- in this macro invocation
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_mut
         = note: this warning originates in the macro `seq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
    help: reborrow instead
         |
    1054 |                         $clear(&mut *self.0);
         |                                     +

    warning: borrow of a mutable reference
        --> serde_core/src/de/impls.rs:1055:34
         |
    1055 |                           $reserve(&mut self.0, size_hint::cautious::<T>($access.size_hint()));
         |                                    ^^^^^
    ...
    1120 | / seq_impl!(
    1121 | |     #[cfg(any(feature = "std", feature = "alloc"))]
    1122 | |     #[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
    1123 | |     VecDeque<T>,
    ...    |
    1128 | |     VecDeque::push_back
    1129 | | );
         | |_- in this macro invocation
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_mut
         = note: this warning originates in the macro `seq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
    help: reborrow instead
         |
    1055 |                         $reserve(&mut *self.0, size_hint::cautious::<T>($access.size_hint()));
         |                                       +

    warning: borrow of a mutable reference
        --> serde_core/src/de/impls.rs:1059:37
         |
    1059 |                               $insert(&mut self.0, value);
         |                                       ^^^^^
    ...
    1120 | / seq_impl!(
    1121 | |     #[cfg(any(feature = "std", feature = "alloc"))]
    1122 | |     #[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
    1123 | |     VecDeque<T>,
    ...    |
    1128 | |     VecDeque::push_back
    1129 | | );
         | |_- in this macro invocation
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_mut
         = note: this warning originates in the macro `seq_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
    help: reborrow instead
         |
    1059 |                             $insert(&mut *self.0, value);
         |                                          +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⤵️ pull merge-conflict Resolve conflicts manually

Projects

None yet

Development

Successfully merging this pull request may close these issues.