Skip to content

Derive Debug is not generated for structs with large array fields (len() > 32) (need to add new rustc target) #1977

Closed
@DmitrySamoylov

Description

@DmitrySamoylov

Hi! If my struct contains large arrays, then Debug is not being generated. However if I add Debug manually, it compiles and runs just fine.

Input C/C++ Header

typedef struct {
    char f[33];
} A;

Bindgen Invocation

$ bindgen input.h

Actual Results

/* automatically generated by rust-bindgen 0.56.0 */

#[repr(C)]
#[derive(Copy, Clone)]
pub struct A {
    pub f: [::std::os::raw::c_char; 33usize],
}

...

Expected Results

#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct A {
    pub f: [::std::os::raw::c_char; 33usize],
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions