mozilla / cbindgen

A project for generating C bindings from Rust code
Mozilla Public License 2.0
2.29k stars 294 forks source link

conflicting implementations of trait `std::default::Default` for type `config::Config` #921

Closed AnlangA closed 3 months ago

AnlangA commented 5 months ago

└─# rustc --version rustc 1.77.0-nightly (5bd5d214e 2024-01-25)

error[E0119]: conflicting implementations of trait `std::default::Default` for type `config::Config`
    --> /root/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/cbindgen-0.26.0/src/bindgen/config.rs:896:10
     |
896  | #[derive(Default)]
     |          ^^^^^^^ conflicting implementation for `config::Config`
...
1018 | impl Default for Config {
     | ----------------------- first implementation here
     |
     = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
emilio commented 3 months ago

Can you provide some concrete steps to reproduce? I don't see the derive in line 896 neither in trunk or in 0.26.0.

emilio commented 3 months ago

Closing as that code is just not there, but lmk if this somehow ended up in a release or something and we can sort this out.