Skip to content

Conversation

@pekkarr
Copy link
Contributor

@pekkarr pekkarr commented Nov 8, 2025

CI for #3313 failed because of this clippy lint.

warning: this `impl` can be derived
    --> bindgen/codegen/mod.rs:4132:1
     |
4132 | / impl Default for NonCopyUnionStyle {
4133 | |     fn default() -> Self {
4134 | |         Self::BindgenWrapper
4135 | |     }
4136 | | }
     | |_^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#derivable_impls
     = note: `#[warn(clippy::derivable_impls)]` on by default
help: replace the manual implementation with a derive attribute and mark the default variant
     |
4111 + #[derive(Default)]
4112 ~ pub enum NonCopyUnionStyle {
4113 |     /// Wrap members in a type generated by `bindgen`.
4114 ~     #[default]
4115 ~     BindgenWrapper,
     |

warning: this `impl` can be derived
   --> bindgen/lib.rs:182:1
    |
182 | / impl Default for Formatter {
183 | |     fn default() -> Self {
184 | |         Self::Rustfmt
185 | |     }
186 | | }
    | |_^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#derivable_impls
help: replace the manual implementation with a derive attribute and mark the default variant
    |
172 + #[derive(Default)]
173 ~ pub enum Formatter {
174 |     /// Do not format the bindings.
175 |     None,
176 |     /// Use `rustfmt` to format the bindings.
177 ~     #[default]
178 ~     Rustfmt,
    |

@pekkarr
Copy link
Contributor Author

pekkarr commented Nov 8, 2025

r? @emilio

@emilio
Copy link
Contributor

emilio commented Nov 8, 2025

Sorry for the dupe review, github is not great with crappy internet and I'm traveling this weekend.

@emilio emilio added this pull request to the merge queue Nov 8, 2025
Merged via the queue into rust-lang:main with commit f94b50d Nov 8, 2025
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants