Introduce --rust-edition by pvdrz · Pull Request #3002 · rust-lang/rust-bindgen (original) (raw)

This PR introduces the concept of Rust editions to bindgen so it can generate appropriate code based on the desired edition.

The motivation behind this PR comes from #2996 which allows bindgen to generate code with C-String literals, a feature that has been available since rust 1.77 but are gated behind the 2021 edition.

The changes in this PR are:

cc @nyurik @emilio