Skip to content
Merged
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
5 changes: 5 additions & 0 deletions bindgen/options/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,11 @@ options! {
///
/// This is similar to the [`Builder::rustified_enum`] style, but the `enum` is
/// tagged with the `#[non_exhaustive]` attribute.
///
/// **Use this with caution**, creating an instance of a Rust `enum` with an
/// invalid value will cause undefined behaviour, even if it's tagged with
/// `#[non_exhaustive]`. To avoid this, use the [`Builder::newtype_enum`] style
/// instead.
pub fn rustified_non_exhaustive_enum<T: AsRef<str>>(mut self, arg: T) -> Builder {
self.options.rustified_non_exhaustive_enums.insert(arg);
self
Expand Down