Skip to content

Commit a844552

Browse files
committed
Remove deprecated methods
1 parent 678daf5 commit a844552

File tree

2 files changed

+4
-95
lines changed

2 files changed

+4
-95
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@
164164
is wrapped in unsafe blocks now.
165165

166166
## Removed
167+
* The following deprecated methods were removed: `whitelist_recursively`,
168+
`hide_type`, `blacklist_type`, `blacklist_function`, `blacklist_item`,
169+
`whitelisted_type`, `whitelist_type`, `whitelist_function`,
170+
`whitelisted_function`, `whitelist_var`, `whitelisted_var`, `unstable_rust`.
167171

168172
## Fixed
169173

bindgen/lib.rs

-95
Original file line numberDiff line numberDiff line change
@@ -796,12 +796,6 @@ impl Builder {
796796
self
797797
}
798798

799-
/// Deprecated alias for allowlist_recursively.
800-
#[deprecated(note = "Use allowlist_recursively instead")]
801-
pub fn whitelist_recursively(self, doit: bool) -> Self {
802-
self.allowlist_recursively(doit)
803-
}
804-
805799
/// Generate `#[macro_use] extern crate objc;` instead of `use objc;`
806800
/// in the prologue of the files generated from objective-c files
807801
pub fn objc_extern_crate(mut self, doit: bool) -> Self {
@@ -834,20 +828,6 @@ impl Builder {
834828
self
835829
}
836830

837-
/// Hide the given type from the generated bindings. Regular expressions are
838-
/// supported.
839-
#[deprecated(note = "Use blocklist_type instead")]
840-
pub fn hide_type<T: AsRef<str>>(self, arg: T) -> Builder {
841-
self.blocklist_type(arg)
842-
}
843-
844-
/// Hide the given type from the generated bindings. Regular expressions are
845-
/// supported.
846-
#[deprecated(note = "Use blocklist_type instead")]
847-
pub fn blacklist_type<T: AsRef<str>>(self, arg: T) -> Builder {
848-
self.blocklist_type(arg)
849-
}
850-
851831
fn_with_regex_arg! {
852832
/// Hide the given type from the generated bindings. Regular expressions are
853833
/// supported.
@@ -859,15 +839,6 @@ impl Builder {
859839
}
860840
}
861841

862-
fn_with_regex_arg! {
863-
/// Hide the given function from the generated bindings. Regular expressions
864-
/// are supported.
865-
#[deprecated(note = "Use blocklist_function instead")]
866-
pub fn blacklist_function<T: AsRef<str>>(self, arg: T) -> Builder {
867-
self.blocklist_function(arg)
868-
}
869-
}
870-
871842
fn_with_regex_arg! {
872843
/// Hide the given function from the generated bindings. Regular expressions
873844
/// are supported.
@@ -883,15 +854,6 @@ impl Builder {
883854
}
884855
}
885856

886-
/// Hide the given item from the generated bindings, regardless of
887-
/// whether it's a type, function, module, etc. Regular
888-
/// expressions are supported.
889-
#[deprecated(note = "Use blocklist_item instead")]
890-
pub fn blacklist_item<T: AsRef<str>>(mut self, arg: T) -> Builder {
891-
self.options.blocklisted_items.insert(arg);
892-
self
893-
}
894-
895857
fn_with_regex_arg! {
896858
/// Hide the given item from the generated bindings, regardless of
897859
/// whether it's a type, function, module, etc. Regular
@@ -924,22 +886,6 @@ impl Builder {
924886
}
925887
}
926888

927-
/// Allowlist the given type so that it (and all types that it transitively
928-
/// refers to) appears in the generated bindings. Regular expressions are
929-
/// supported.
930-
#[deprecated(note = "use allowlist_type instead")]
931-
pub fn whitelisted_type<T: AsRef<str>>(self, arg: T) -> Builder {
932-
self.allowlist_type(arg)
933-
}
934-
935-
/// Allowlist the given type so that it (and all types that it transitively
936-
/// refers to) appears in the generated bindings. Regular expressions are
937-
/// supported.
938-
#[deprecated(note = "use allowlist_type instead")]
939-
pub fn whitelist_type<T: AsRef<str>>(self, arg: T) -> Builder {
940-
self.allowlist_type(arg)
941-
}
942-
943889
fn_with_regex_arg! {
944890
/// Allowlist the given type so that it (and all types that it transitively
945891
/// refers to) appears in the generated bindings. Regular expressions are
@@ -968,22 +914,6 @@ impl Builder {
968914
}
969915
}
970916

971-
/// Allowlist the given function.
972-
///
973-
/// Deprecated: use allowlist_function instead.
974-
#[deprecated(note = "use allowlist_function instead")]
975-
pub fn whitelist_function<T: AsRef<str>>(self, arg: T) -> Builder {
976-
self.allowlist_function(arg)
977-
}
978-
979-
/// Allowlist the given function.
980-
///
981-
/// Deprecated: use allowlist_function instead.
982-
#[deprecated(note = "use allowlist_function instead")]
983-
pub fn whitelisted_function<T: AsRef<str>>(self, arg: T) -> Builder {
984-
self.allowlist_function(arg)
985-
}
986-
987917
fn_with_regex_arg! {
988918
/// Allowlist the given variable so that it (and all types that it
989919
/// transitively refers to) appears in the generated bindings. Regular
@@ -1004,20 +934,6 @@ impl Builder {
1004934
}
1005935
}
1006936

1007-
/// Deprecated: use allowlist_var instead.
1008-
#[deprecated(note = "use allowlist_var instead")]
1009-
pub fn whitelist_var<T: AsRef<str>>(self, arg: T) -> Builder {
1010-
self.allowlist_var(arg)
1011-
}
1012-
1013-
/// Allowlist the given variable.
1014-
///
1015-
/// Deprecated: use allowlist_var instead.
1016-
#[deprecated(note = "use allowlist_var instead")]
1017-
pub fn whitelisted_var<T: AsRef<str>>(self, arg: T) -> Builder {
1018-
self.allowlist_var(arg)
1019-
}
1020-
1021937
/// Set the default style of code to generate for enums
1022938
pub fn default_enum_style(
1023939
mut self,
@@ -1496,17 +1412,6 @@ impl Builder {
14961412
self
14971413
}
14981414

1499-
/// Avoid generating any unstable Rust, such as Rust unions, in the generated bindings.
1500-
#[deprecated(note = "please use `rust_target` instead")]
1501-
pub fn unstable_rust(self, doit: bool) -> Self {
1502-
let rust_target = if doit {
1503-
RustTarget::Nightly
1504-
} else {
1505-
LATEST_STABLE_RUST
1506-
};
1507-
self.rust_target(rust_target)
1508-
}
1509-
15101415
/// Use core instead of libstd in the generated bindings.
15111416
pub fn use_core(mut self) -> Builder {
15121417
self.options.use_core = true;

0 commit comments

Comments
 (0)