Skip to content

Commit

Permalink
Remove deprecated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdrz committed Nov 14, 2022
1 parent 678daf5 commit a844552
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 95 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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

Expand Down
95 changes: 0 additions & 95 deletions bindgen/lib.rs
Expand Up @@ -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 {
Expand Down Expand Up @@ -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<T: AsRef<str>>(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<T: AsRef<str>>(self, arg: T) -> Builder {
self.blocklist_type(arg)
}

fn_with_regex_arg! {
/// Hide the given type from the generated bindings. Regular expressions are
/// supported.
Expand All @@ -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<T: AsRef<str>>(self, arg: T) -> Builder {
self.blocklist_function(arg)
}
}

fn_with_regex_arg! {
/// Hide the given function from the generated bindings. Regular expressions
/// are supported.
Expand All @@ -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<T: AsRef<str>>(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
Expand Down Expand Up @@ -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<T: AsRef<str>>(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<T: AsRef<str>>(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
Expand Down Expand Up @@ -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<T: AsRef<str>>(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<T: AsRef<str>>(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
Expand All @@ -1004,20 +934,6 @@ impl Builder {
}
}

/// Deprecated: use allowlist_var instead.
#[deprecated(note = "use allowlist_var instead")]
pub fn whitelist_var<T: AsRef<str>>(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<T: AsRef<str>>(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,
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit a844552

Please sign in to comment.