Skip to content

Fix --rustified-non-exhaustive-enum flag #3266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@
## Changed
## Removed
## Fixed
- Typo in code for `--rustified-non-exhaustive-enums` (#3266)
## Security

# 0.72.0 (2025-06-08)
Expand Down Expand Up @@ -277,8 +278,8 @@
- Add support for custom attributes with the `--with-attribute-custom` flag (#2866)
- Allow setting `--rust-target` to any Rust version supported by bindgen (#2993)
- Use c-string literals if the `--generate-cstr` flag is used for Rust targets after 1.77 under the 2021 edition (#2996)
- Add the `--rust-edition` flag which allows to select which Rust edition to target. (#3002, #3013)
- Use `unsafe extern` instead of `extern` in blocks for any Rust target after 1.82. (#3015)
- Add the `--rust-edition` flag which allows to select which Rust edition to target. (#3002, #3013)
- Use `unsafe extern` instead of `extern` in blocks for any Rust target after 1.82. (#3015)
## Changed
- The `--wrap-static-fns` related options no longer require the experimental feature or flag (#2928)
- Use the `Display` implementation instead of the `Debug` one for `BindgenError` in `bindgen-cli` (#3005)
Expand Down Expand Up @@ -443,7 +444,7 @@ This version was skipped due to some problems on the release workflow.
* The `--wrap-static-fns` option can now wrap `va_list` functions as variadic functions
with the experimental `ParseCallbacks::wrap_as_variadic_fn` method.
* Add target mappings for riscv32imc and riscv32imac.
* Add the `ParseCallbacks::field_visibility` method to modify field visibility.
* Add the `ParseCallbacks::field_visibility` method to modify field visibility.

## Changed

Expand All @@ -467,7 +468,7 @@ This version was skipped due to some problems on the release workflow.
* Compute visibility of bitfield unit based on actual field visibility: A
bitfield unit field and its related functions now have their visibility
determined based on the most private between the default visibility and the
actual visibility of the bitfields within the unit.
actual visibility of the bitfields within the unit.

## Removed
* Remove redundant Cargo features, which were all implicit:
Expand Down Expand Up @@ -523,7 +524,7 @@ This version was skipped due to some problems on the release workflow.
types. (#2463)
* The `Builder::rustfmt_bindings` methods and the `--no-rustfmt-bindings` flag
are now deprecated in favor of the formatter API. (#2453)

## Removed
* The following deprecated flags were removed: `--use-msvc-mangling`,
`--rustfmt-bindings` and `--size_t-is-usize`. (#2408)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions bindgen-tests/tests/headers/enum-doc-rusty-non-exhaustive.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// bindgen-flags: --rustified-non-exhaustive-enum B

#include "enum-doc.h"
2 changes: 1 addition & 1 deletion bindgen/options/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ options! {
}
}
},
as_args: "--rustified-non-exhaustive-enums",
as_args: "--rustified-non-exhaustive-enum",
},
/// `enum`s marked as modules of constants.
constified_enum_modules: RegexSet {
Expand Down
Loading