diff options
-rw-r--r-- | src/clang.rs | 2 | ||||
-rw-r--r-- | src/gen.rs | 2 | ||||
-rw-r--r-- | src/lib.rs | 1 | ||||
-rw-r--r-- | src/parser.rs | 1 | ||||
-rw-r--r-- | src/types.rs | 2 | ||||
-rw-r--r-- | tests/test_builtins.rs | 2 | ||||
-rw-r--r-- | tests/test_cmath.rs | 2 | ||||
-rw-r--r-- | tests/test_struct.rs | 1 | ||||
-rw-r--r-- | tests/test_union.rs | 2 |
9 files changed, 4 insertions, 11 deletions
diff --git a/src/clang.rs b/src/clang.rs index 0766ea3b..3b1878f7 100644 --- a/src/clang.rs +++ b/src/clang.rs @@ -1,4 +1,4 @@ -#![allow(non_upper_case_globals)] +#![allow(non_upper_case_globals, dead_code)] use libc::{c_uint, c_char, c_int, c_ulong}; use std::{mem, ptr}; @@ -1,5 +1,3 @@ -#![allow(unused_must_use)] - use std::cell::RefCell; use std::vec::Vec; use std::rc::Rc; @@ -22,7 +22,6 @@ use types::Global; mod types; mod clangll; -#[allow(dead_code)] mod clang; mod gen; mod parser; diff --git a/src/parser.rs b/src/parser.rs index d95e35e6..3be927a1 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -1,4 +1,3 @@ -#![allow(unused_must_use)] #![allow(non_upper_case_globals)] use std::collections::{HashMap, HashSet}; diff --git a/src/types.rs b/src/types.rs index 5d7c5669..88b73e51 100644 --- a/src/types.rs +++ b/src/types.rs @@ -91,7 +91,6 @@ pub enum Type { TEnum(Rc<RefCell<EnumInfo>>) } -#[allow(dead_code)] impl Type { pub fn size(&self) -> usize { match self { @@ -108,6 +107,7 @@ impl Type { } } + #[allow(dead_code)] pub fn align(&self) -> usize { match self { &TInt(_, l) => l.align, diff --git a/tests/test_builtins.rs b/tests/test_builtins.rs index dccb63f7..a630cce0 100644 --- a/tests/test_builtins.rs +++ b/tests/test_builtins.rs @@ -1,6 +1,6 @@ #[test] fn test_builtin_va_list() { - #[allow(dead_code, non_camel_case_types, raw_pointer_derive)] + #[allow(non_camel_case_types)] mod ffi { bindgen!("headers/builtin_va_list.h", emit_builtins = true); } // Should test for more than compilation. } diff --git a/tests/test_cmath.rs b/tests/test_cmath.rs index baa89dbb..03c02ae7 100644 --- a/tests/test_cmath.rs +++ b/tests/test_cmath.rs @@ -1,4 +1,4 @@ -#[allow(dead_code, non_camel_case_types, non_upper_case_globals, raw_pointer_derive)] +#[allow(dead_code, non_camel_case_types)] pub mod ffi { bindgen!("/usr/include/math.h", link = "m"); } #[test] diff --git a/tests/test_struct.rs b/tests/test_struct.rs index 634c09d1..200eaf99 100644 --- a/tests/test_struct.rs +++ b/tests/test_struct.rs @@ -59,7 +59,6 @@ fn with_anon_struct_array() { #[test] fn with_anon_struct_pointer() { - #[allow(raw_pointer_derive)] mod ffi { bindgen!("headers/struct_with_anon_struct_pointer.h"); } let mut x: ffi::Struct_foo = Default::default(); let mut unnamed: ffi::Struct_Unnamed1 = Default::default(); diff --git a/tests/test_union.rs b/tests/test_union.rs index af6b9fa9..9380152a 100644 --- a/tests/test_union.rs +++ b/tests/test_union.rs @@ -2,8 +2,6 @@ use std::default::Default; #[test] fn with_anon_struct() { - // XXX: Rustc thinks that the anonymous struct, bar, is unused. - #[allow(dead_code)] mod ffi { bindgen!("headers/union_with_anon_struct.h"); } let mut x: ffi::Union_foo = Default::default(); |