rust-lang / rust-bindgen

Automatically generates Rust FFI bindings to C (and some C++) libraries.
https://rust-lang.github.io/rust-bindgen/
BSD 3-Clause "New" or "Revised" License
4.39k stars 691 forks source link

Case-insensitive regexes were useful #2760

Open Dr-Emann opened 7 months ago

Dr-Emann commented 7 months ago

I think case insensitivity (unicode-case) was useful:

--allowlist-item '(?i)(aaa|bbb).*' used to work for e.g. AAA_CONST, and bbb_func()

Now it (silently 😲) matches nothing.

As a workaround, it looks like for my case I can use --allowlist-item '(?i-u:aaa|bbb).*', which turns on case insensitivity, and turns off unicode matching for my literal prefixes.

Originally posted by @Dr-Emann in https://github.com/rust-lang/rust-bindgen/issues/2702#issuecomment-1940389007