diff --git a/src/lib.rs b/src/lib.rs index d2c7cf394..34a885920 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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 83511d734..070813ee7 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), All(Vec), + #[allow(dead_code)] // only used by cxx-build, not cxxbridge-macro Any(Vec), + #[allow(dead_code)] // only used by cxx-build, not cxxbridge-macro Not(Box), } diff --git a/syntax/mod.rs b/syntax/mod.rs index 5ff343b4d..eacba5541 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 ef8d5b371..f3a8310f1 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 {