diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 8 | ||||
-rw-r--r-- | src/options.rs | 10 |
2 files changed, 9 insertions, 9 deletions
@@ -333,7 +333,7 @@ impl Builder { } if !self.options.unstable_rust { - output_vector.push("--no-unstable-rust".into()); + output_vector.push("--unstable-rust".into()); } self.options @@ -736,8 +736,8 @@ impl Builder { } /// Avoid generating any unstable Rust, such as Rust unions, in the generated bindings. - pub fn no_unstable_rust(mut self) -> Builder { - self.options.unstable_rust = false; + pub fn unstable_rust(mut self, doit: bool) -> Self { + self.options.unstable_rust = doit; self } @@ -959,7 +959,7 @@ impl Default for BindgenOptions { derive_default: false, enable_cxx_namespaces: false, disable_name_namespacing: false, - unstable_rust: true, + unstable_rust: false, use_core: false, ctypes_prefix: None, namespaced_constants: true, diff --git a/src/options.rs b/src/options.rs index bbf9c0dd..fc0dd247 100644 --- a/src/options.rs +++ b/src/options.rs @@ -135,9 +135,9 @@ pub fn builder_from_flags<I> Arg::with_name("no-prepend-enum-name") .long("no-prepend-enum-name") .help("Do not prepend the enum name to bitfield or constant variants."), - Arg::with_name("no-unstable-rust") - .long("no-unstable-rust") - .help("Do not generate unstable Rust code.") + Arg::with_name("unstable-rust") + .long("unstable-rust") + .help("Generate unstable Rust code.") .multiple(true), // FIXME: Pass legacy test suite Arg::with_name("opaque-type") .long("opaque-type") @@ -325,8 +325,8 @@ pub fn builder_from_flags<I> builder = builder.ignore_methods(); } - if matches.is_present("no-unstable-rust") { - builder = builder.no_unstable_rust(); + if matches.is_present("unstable-rust") { + builder = builder.unstable_rust(true); } if matches.is_present("no-convert-floats") { |