Skip to content

Commit b1bf46e

Browse files
committed
Clean up allows
1 parent 51401e6 commit b1bf46e

File tree

9 files changed

+4
-11
lines changed

9 files changed

+4
-11
lines changed

src/clang.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(non_upper_case_globals)]
1+
#![allow(non_upper_case_globals, dead_code)]
22

33
use libc::{c_uint, c_char, c_int, c_ulong};
44
use std::{mem, ptr};

src/gen.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(unused_must_use)]
2-
31
use std::cell::RefCell;
42
use std::vec::Vec;
53
use std::rc::Rc;

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ use types::Global;
2222

2323
mod types;
2424
mod clangll;
25-
#[allow(dead_code)]
2625
mod clang;
2726
mod gen;
2827
mod parser;

src/parser.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![allow(unused_must_use)]
21
#![allow(non_upper_case_globals)]
32

43
use std::collections::{HashMap, HashSet};

src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ pub enum Type {
9191
TEnum(Rc<RefCell<EnumInfo>>)
9292
}
9393

94-
#[allow(dead_code)]
9594
impl Type {
9695
pub fn size(&self) -> usize {
9796
match self {
@@ -108,6 +107,7 @@ impl Type {
108107
}
109108
}
110109

110+
#[allow(dead_code)]
111111
pub fn align(&self) -> usize {
112112
match self {
113113
&TInt(_, l) => l.align,

tests/test_builtins.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#[test]
22
fn test_builtin_va_list() {
3-
#[allow(dead_code, non_camel_case_types, raw_pointer_derive)]
3+
#[allow(non_camel_case_types)]
44
mod ffi { bindgen!("headers/builtin_va_list.h", emit_builtins = true); }
55
// Should test for more than compilation.
66
}

tests/test_cmath.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#[allow(dead_code, non_camel_case_types, non_upper_case_globals, raw_pointer_derive)]
1+
#[allow(dead_code, non_camel_case_types)]
22
pub mod ffi { bindgen!("/usr/include/math.h", link = "m"); }
33

44
#[test]

tests/test_struct.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ fn with_anon_struct_array() {
5959

6060
#[test]
6161
fn with_anon_struct_pointer() {
62-
#[allow(raw_pointer_derive)]
6362
mod ffi { bindgen!("headers/struct_with_anon_struct_pointer.h"); }
6463
let mut x: ffi::Struct_foo = Default::default();
6564
let mut unnamed: ffi::Struct_Unnamed1 = Default::default();

tests/test_union.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ use std::default::Default;
22

33
#[test]
44
fn with_anon_struct() {
5-
// XXX: Rustc thinks that the anonymous struct, bar, is unused.
6-
#[allow(dead_code)]
75
mod ffi { bindgen!("headers/union_with_anon_struct.h"); }
86
let mut x: ffi::Union_foo = Default::default();
97

0 commit comments

Comments
 (0)