Skip to content

Commit

Permalink
Revert "Add flag to ignore type blocklist when computing derive infor…
Browse files Browse the repository at this point in the history
…mation"

This reverts commit 7286c81, because it
was not intended to be merged after all, see
#2003 (comment).
  • Loading branch information
emilio committed Mar 11, 2021
1 parent 7286c81 commit fb931bd
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 117 deletions.
5 changes: 2 additions & 3 deletions src/ir/analysis/derive.rs
Expand Up @@ -138,9 +138,8 @@ impl<'ctx> CannotDerive<'ctx> {
}

fn constrain_type(&mut self, item: &Item, ty: &Type) -> CanDerive {
if !self.ctx.options().derive_ignore_blocklist &&
!self.ctx.allowlisted_items().contains(&item.id())
{ trace!(
if !self.ctx.allowlisted_items().contains(&item.id()) {
trace!(
" cannot derive {} for blocklisted type",
self.derive_trait
);
Expand Down
14 changes: 0 additions & 14 deletions src/lib.rs
Expand Up @@ -549,10 +549,6 @@ impl Builder {
output_vector.push("--respect-cxx-access-specs".into());
}

if self.options.derive_ignore_blocklist {
output_vector.push("--derive-ignore-blocklist".into());
}

// Add clang arguments

output_vector.push("--".into());
Expand Down Expand Up @@ -1572,12 +1568,6 @@ impl Builder {
self.options.respect_cxx_access_specs = doit;
self
}

/// Ignore the type blocklist when computing type derive information
pub fn derive_ignore_blocklist(mut self, doit: bool) -> Self {
self.options.derive_ignore_blocklist = doit;
self
}
}

/// Configuration options for generated bindings.
Expand Down Expand Up @@ -1869,9 +1859,6 @@ struct BindgenOptions {
/// Only make generated bindings `pub` if the items would be publically accessible
/// by C++.
respect_cxx_access_specs: bool,

/// Ignore the type blocklist when computing type derive information
derive_ignore_blocklist: bool,
}

/// TODO(emilio): This is sort of a lie (see the error message that results from
Expand Down Expand Up @@ -2009,7 +1996,6 @@ impl Default for BindgenOptions {
wasm_import_module_name: None,
dynamic_library_name: None,
respect_cxx_access_specs: false,
derive_ignore_blocklist: false,
}
}
}
Expand Down
7 changes: 0 additions & 7 deletions src/options.rs
Expand Up @@ -503,9 +503,6 @@ where
Arg::with_name("respect-cxx-access-specs")
.long("respect-cxx-access-specs")
.help("Makes generated bindings `pub` only for items if the items are publically accessible in C++."),
Arg::with_name("derive-ignore-blocklist")
.long("derive-ignore-blocklist")
.help("Ignore the type blocklist when computing type derive information"),
]) // .args()
.get_matches_from(args);

Expand Down Expand Up @@ -932,10 +929,6 @@ where
builder = builder.respect_cxx_access_specs(true);
}

if matches.is_present("derive-ignore-blocklist") {
builder = builder.derive_ignore_blocklist(true);
}

let verbose = matches.is_present("verbose");

Ok((builder, output, verbose))
Expand Down
81 changes: 0 additions & 81 deletions tests/expectations/tests/issue-1454.rs

This file was deleted.

12 changes: 0 additions & 12 deletions tests/headers/issue-1454.h

This file was deleted.

0 comments on commit fb931bd

Please sign in to comment.