summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--book/src/nocopy.md10
-rw-r--r--src/ir/context.rs2
2 files changed, 10 insertions, 2 deletions
diff --git a/book/src/nocopy.md b/book/src/nocopy.md
index 893f0932..06879ed1 100644
--- a/book/src/nocopy.md
+++ b/book/src/nocopy.md
@@ -6,6 +6,16 @@ Clone)]` to a translated type definition will compile, it still shouldn't do
that for reasons it can't know. In these cases, the `nocopy` annotation can be
used to prevent bindgen to autoderive the `Copy` and `Clone` traits for a type.
+###Library
+
+* [`bindgen::Builder::no_copy`](https://docs.rs/bindgen/0.23.1/bindgen/struct.Builder.html#method.no_copy)
+
+### Command Line
+
+* `--no-copy <regex>`
+
+### Annotations
+
```c
/**
* Although bindgen can't know, this struct is not safe to move because pthread
diff --git a/src/ir/context.rs b/src/ir/context.rs
index b7332b8e..44267c7c 100644
--- a/src/ir/context.rs
+++ b/src/ir/context.rs
@@ -2455,14 +2455,12 @@ impl BindgenContext {
/// Check if `--no-partialeq` flag is enabled for this item.
pub fn no_partialeq_by_name(&self, item: &Item) -> bool {
let name = item.canonical_path(self)[1..].join("::");
-
self.options().no_partialeq_types.matches(&name)
}
/// Check if `--no-copy` flag is enabled for this item.
pub fn no_copy_by_name(&self, item: &Item) -> bool {
let name = item.canonical_path(self)[1..].join("::");
-
self.options().no_copy_types.matches(&name)
}
}