mirror of
https://github.com/topjohnwu/cxx.git
synced 2024-10-07 00:53:28 +00:00
Merge pull request #1303 from dtolnay/deadcode
Work around new dead_code warnings
This commit is contained in:
commit
5bbe3e8606
@ -548,4 +548,4 @@ chars! {
|
||||
}
|
||||
|
||||
#[repr(transparent)]
|
||||
struct void(core::ffi::c_void);
|
||||
struct void(#[allow(dead_code)] core::ffi::c_void);
|
||||
|
@ -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>),
|
||||
}
|
||||
|
||||
|
@ -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),
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user