diff options
-rw-r--r-- | src/lib.rs | 2 | ||||
-rw-r--r-- | syntax/cfg.rs | 3 | ||||
-rw-r--r-- | syntax/mod.rs | 1 | ||||
-rw-r--r-- | tests/ffi/lib.rs | 2 |
4 files changed, 6 insertions, 2 deletions
@@ -548,4 +548,4 @@ chars! { } #[repr(transparent)] -struct void(core::ffi::c_void); +struct void(#[allow(dead_code)] core::ffi::c_void); diff --git a/syntax/cfg.rs b/syntax/cfg.rs index 83511d73..070813ee 100644 --- a/syntax/cfg.rs +++ b/syntax/cfg.rs @@ -6,9 +6,12 @@ use syn::{parenthesized, token, Attribute, LitStr, Token}; #[derive(Clone)] pub(crate) enum CfgExpr { Unconditional, + #[allow(dead_code)] // only used by cxx-build, not cxxbridge-macro Eq(Ident, Option<LitStr>), All(Vec<CfgExpr>), + #[allow(dead_code)] // only used by cxx-build, not cxxbridge-macro Any(Vec<CfgExpr>), + #[allow(dead_code)] // only used by cxx-build, not cxxbridge-macro Not(Box<CfgExpr>), } diff --git a/syntax/mod.rs b/syntax/mod.rs index 5ff343b4..eacba554 100644 --- a/syntax/mod.rs +++ b/syntax/mod.rs @@ -49,6 +49,7 @@ pub(crate) use self::parse::parse_items; pub(crate) use self::types::Types; pub(crate) enum Api { + #[allow(dead_code)] // only used by cxx-build, not cxxbridge-macro Include(Include), Struct(Struct), Enum(Enum), diff --git a/tests/ffi/lib.rs b/tests/ffi/lib.rs index ef8d5b37..f3a8310f 100644 --- a/tests/ffi/lib.rs +++ b/tests/ffi/lib.rs @@ -408,7 +408,7 @@ impl R { } } -pub struct Reference<'a>(&'a String); +pub struct Reference<'a>(pub &'a String); impl ffi::Shared { fn r_method_on_shared(&self) -> String { |