Skip to content

rewriting static string in generated bindings #2852

@robin-nitrokey

Description

@robin-nitrokey

Input C/C++ Header

#define test 0

Bindgen Invocation

$  cargo --version
cargo 1.81.0-nightly (bc89bffa5 2024-06-22)
$ git describe
v0.69.1-94-gcf9b02f5
$ cargo run -- repro.h

Actual Results

/* automatically generated by rust-bindgen 0.69.4 */

rewriting static
pub const test: u32 = 0;

Expected Results

The generated bindings should compile properly and not contain arbitrary strings.

notes:

  • even occurs with 0.69.4 from crates.io and when invoking Builder::generate from build.rs
  • only occurs since nightly-2024-06-23, nightly-2024-06-22 still works

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions