diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a6165b9ac..c0d3494e75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -230,6 +230,7 @@ ## Changed ## Removed ## Fixed +- Typo in code for `--rustified-non-exhaustive-enums` (#3266) ## Security # 0.72.0 (2025-06-08) @@ -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) @@ -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 @@ -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: @@ -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) diff --git a/bindgen-tests/tests/expectations/tests/enum-doc-rusty-non-exhaustive.rs b/bindgen-tests/tests/expectations/tests/enum-doc-rusty-non-exhaustive.rs new file mode 100644 index 0000000000..1d09466119 --- /dev/null +++ b/bindgen-tests/tests/expectations/tests/enum-doc-rusty-non-exhaustive.rs @@ -0,0 +1,22 @@ +#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] +#[repr(u32)] +#[non_exhaustive] +/// Document enum +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum B { + /// Document field with three slashes + VAR_A = 0, + /// Document field with preceding star + VAR_B = 1, + /// Document field with preceding exclamation + VAR_C = 2, + ///< Document field with following star + VAR_D = 3, + ///< Document field with following exclamation + VAR_E = 4, + /** Document field with preceding star, with a loong long multiline + comment. + + Very interesting documentation, definitely.*/ + VAR_F = 5, +} diff --git a/bindgen-tests/tests/headers/enum-doc-rusty-non-exhaustive.h b/bindgen-tests/tests/headers/enum-doc-rusty-non-exhaustive.h new file mode 100644 index 0000000000..b544a0c4fc --- /dev/null +++ b/bindgen-tests/tests/headers/enum-doc-rusty-non-exhaustive.h @@ -0,0 +1,3 @@ +// bindgen-flags: --rustified-non-exhaustive-enum B + +#include "enum-doc.h" diff --git a/bindgen/options/mod.rs b/bindgen/options/mod.rs index b876b4d5b3..767be03e35 100644 --- a/bindgen/options/mod.rs +++ b/bindgen/options/mod.rs @@ -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 {