From a844552fad90b37c6e81b27b7edfcd986790e4a9 Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Mon, 14 Nov 2022 12:59:17 -0500 Subject: [PATCH] Remove deprecated methods --- CHANGELOG.md | 4 +++ bindgen/lib.rs | 95 -------------------------------------------------- 2 files changed, 4 insertions(+), 95 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 506878c408..45c236e401 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -164,6 +164,10 @@ is wrapped in unsafe blocks now. ## Removed + * The following deprecated methods were removed: `whitelist_recursively`, + `hide_type`, `blacklist_type`, `blacklist_function`, `blacklist_item`, + `whitelisted_type`, `whitelist_type`, `whitelist_function`, + `whitelisted_function`, `whitelist_var`, `whitelisted_var`, `unstable_rust`. ## Fixed diff --git a/bindgen/lib.rs b/bindgen/lib.rs index e18a2a992c..bfc22bb6b4 100644 --- a/bindgen/lib.rs +++ b/bindgen/lib.rs @@ -796,12 +796,6 @@ impl Builder { self } - /// Deprecated alias for allowlist_recursively. - #[deprecated(note = "Use allowlist_recursively instead")] - pub fn whitelist_recursively(self, doit: bool) -> Self { - self.allowlist_recursively(doit) - } - /// Generate `#[macro_use] extern crate objc;` instead of `use objc;` /// in the prologue of the files generated from objective-c files pub fn objc_extern_crate(mut self, doit: bool) -> Self { @@ -834,20 +828,6 @@ impl Builder { self } - /// Hide the given type from the generated bindings. Regular expressions are - /// supported. - #[deprecated(note = "Use blocklist_type instead")] - pub fn hide_type>(self, arg: T) -> Builder { - self.blocklist_type(arg) - } - - /// Hide the given type from the generated bindings. Regular expressions are - /// supported. - #[deprecated(note = "Use blocklist_type instead")] - pub fn blacklist_type>(self, arg: T) -> Builder { - self.blocklist_type(arg) - } - fn_with_regex_arg! { /// Hide the given type from the generated bindings. Regular expressions are /// supported. @@ -859,15 +839,6 @@ impl Builder { } } - fn_with_regex_arg! { - /// Hide the given function from the generated bindings. Regular expressions - /// are supported. - #[deprecated(note = "Use blocklist_function instead")] - pub fn blacklist_function>(self, arg: T) -> Builder { - self.blocklist_function(arg) - } - } - fn_with_regex_arg! { /// Hide the given function from the generated bindings. Regular expressions /// are supported. @@ -883,15 +854,6 @@ impl Builder { } } - /// Hide the given item from the generated bindings, regardless of - /// whether it's a type, function, module, etc. Regular - /// expressions are supported. - #[deprecated(note = "Use blocklist_item instead")] - pub fn blacklist_item>(mut self, arg: T) -> Builder { - self.options.blocklisted_items.insert(arg); - self - } - fn_with_regex_arg! { /// Hide the given item from the generated bindings, regardless of /// whether it's a type, function, module, etc. Regular @@ -924,22 +886,6 @@ impl Builder { } } - /// Allowlist the given type so that it (and all types that it transitively - /// refers to) appears in the generated bindings. Regular expressions are - /// supported. - #[deprecated(note = "use allowlist_type instead")] - pub fn whitelisted_type>(self, arg: T) -> Builder { - self.allowlist_type(arg) - } - - /// Allowlist the given type so that it (and all types that it transitively - /// refers to) appears in the generated bindings. Regular expressions are - /// supported. - #[deprecated(note = "use allowlist_type instead")] - pub fn whitelist_type>(self, arg: T) -> Builder { - self.allowlist_type(arg) - } - fn_with_regex_arg! { /// Allowlist the given type so that it (and all types that it transitively /// refers to) appears in the generated bindings. Regular expressions are @@ -968,22 +914,6 @@ impl Builder { } } - /// Allowlist the given function. - /// - /// Deprecated: use allowlist_function instead. - #[deprecated(note = "use allowlist_function instead")] - pub fn whitelist_function>(self, arg: T) -> Builder { - self.allowlist_function(arg) - } - - /// Allowlist the given function. - /// - /// Deprecated: use allowlist_function instead. - #[deprecated(note = "use allowlist_function instead")] - pub fn whitelisted_function>(self, arg: T) -> Builder { - self.allowlist_function(arg) - } - fn_with_regex_arg! { /// Allowlist the given variable so that it (and all types that it /// transitively refers to) appears in the generated bindings. Regular @@ -1004,20 +934,6 @@ impl Builder { } } - /// Deprecated: use allowlist_var instead. - #[deprecated(note = "use allowlist_var instead")] - pub fn whitelist_var>(self, arg: T) -> Builder { - self.allowlist_var(arg) - } - - /// Allowlist the given variable. - /// - /// Deprecated: use allowlist_var instead. - #[deprecated(note = "use allowlist_var instead")] - pub fn whitelisted_var>(self, arg: T) -> Builder { - self.allowlist_var(arg) - } - /// Set the default style of code to generate for enums pub fn default_enum_style( mut self, @@ -1496,17 +1412,6 @@ impl Builder { self } - /// Avoid generating any unstable Rust, such as Rust unions, in the generated bindings. - #[deprecated(note = "please use `rust_target` instead")] - pub fn unstable_rust(self, doit: bool) -> Self { - let rust_target = if doit { - RustTarget::Nightly - } else { - LATEST_STABLE_RUST - }; - self.rust_target(rust_target) - } - /// Use core instead of libstd in the generated bindings. pub fn use_core(mut self) -> Builder { self.options.use_core = true;