rust-lang / rust-lang/rust-bindgen

'"type-parameter-0-0" is not a valid Ident' when using blocklist-item "std::.*"

Open
#2,437 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-C++ A-templates
Dominant language
Rust
Stars
5.3k
Forks
829
Avg merge
1d 1h
Merged PRs (30d)
15

Description

Input C/C++ Header
#include <string> // or any other std header
void func1();
Bindgen Invocation
$ bindgen input.h --blocklist-item "std::.*" -- -x c++
Actual Results
panicked at '"type-parameter-0-0" is not a valid Ident', /home/supreme/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.51/src/fallback.rs:752:9
Expected Results

Successful binding generation without anything from std

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with input.h containing and func1(), then run bindgen with --blocklist-item "std::.*" -- -x c++. Trace the blocklist handling and generated identifier path that produces the invalid type-parameter-0-0 name; done means bindings generate successfully without std items and the regression is covered by a test.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, rust
Domain
compilers, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.