From f7e370ab2e3a06f2e7776dc8c1b3df3c49891e08 Mon Sep 17 00:00:00 2001 From: Taylor Foxhall Date: Wed, 25 Oct 2017 19:24:08 -0400 Subject: delete empty lines, update book with no_copy usage --- book/src/nocopy.md | 10 ++++++++++ src/ir/context.rs | 2 -- 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 ` + +### 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) } } -- cgit v1.2.3