Skip to content

Commit fb931bd

Browse files
committed
Revert "Add flag to ignore type blocklist when computing derive information"
This reverts commit 7286c81, because it was not intended to be merged after all, see #2003 (comment).
1 parent 7286c81 commit fb931bd

File tree

5 files changed

+2
-117
lines changed

5 files changed

+2
-117
lines changed

src/ir/analysis/derive.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,8 @@ impl<'ctx> CannotDerive<'ctx> {
138138
}
139139

140140
fn constrain_type(&mut self, item: &Item, ty: &Type) -> CanDerive {
141-
if !self.ctx.options().derive_ignore_blocklist &&
142-
!self.ctx.allowlisted_items().contains(&item.id())
143-
{ trace!(
141+
if !self.ctx.allowlisted_items().contains(&item.id()) {
142+
trace!(
144143
" cannot derive {} for blocklisted type",
145144
self.derive_trait
146145
);

src/lib.rs

-14
Original file line numberDiff line numberDiff line change
@@ -549,10 +549,6 @@ impl Builder {
549549
output_vector.push("--respect-cxx-access-specs".into());
550550
}
551551

552-
if self.options.derive_ignore_blocklist {
553-
output_vector.push("--derive-ignore-blocklist".into());
554-
}
555-
556552
// Add clang arguments
557553

558554
output_vector.push("--".into());
@@ -1572,12 +1568,6 @@ impl Builder {
15721568
self.options.respect_cxx_access_specs = doit;
15731569
self
15741570
}
1575-
1576-
/// Ignore the type blocklist when computing type derive information
1577-
pub fn derive_ignore_blocklist(mut self, doit: bool) -> Self {
1578-
self.options.derive_ignore_blocklist = doit;
1579-
self
1580-
}
15811571
}
15821572

15831573
/// Configuration options for generated bindings.
@@ -1869,9 +1859,6 @@ struct BindgenOptions {
18691859
/// Only make generated bindings `pub` if the items would be publically accessible
18701860
/// by C++.
18711861
respect_cxx_access_specs: bool,
1872-
1873-
/// Ignore the type blocklist when computing type derive information
1874-
derive_ignore_blocklist: bool,
18751862
}
18761863

18771864
/// TODO(emilio): This is sort of a lie (see the error message that results from
@@ -2009,7 +1996,6 @@ impl Default for BindgenOptions {
20091996
wasm_import_module_name: None,
20101997
dynamic_library_name: None,
20111998
respect_cxx_access_specs: false,
2012-
derive_ignore_blocklist: false,
20131999
}
20142000
}
20152001
}

src/options.rs

-7
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,6 @@ where
503503
Arg::with_name("respect-cxx-access-specs")
504504
.long("respect-cxx-access-specs")
505505
.help("Makes generated bindings `pub` only for items if the items are publically accessible in C++."),
506-
Arg::with_name("derive-ignore-blocklist")
507-
.long("derive-ignore-blocklist")
508-
.help("Ignore the type blocklist when computing type derive information"),
509506
]) // .args()
510507
.get_matches_from(args);
511508

@@ -932,10 +929,6 @@ where
932929
builder = builder.respect_cxx_access_specs(true);
933930
}
934931

935-
if matches.is_present("derive-ignore-blocklist") {
936-
builder = builder.derive_ignore_blocklist(true);
937-
}
938-
939932
let verbose = matches.is_present("verbose");
940933

941934
Ok((builder, output, verbose))

tests/expectations/tests/issue-1454.rs

-81
This file was deleted.

tests/headers/issue-1454.h

-12
This file was deleted.

0 commit comments

Comments
 (0)