1 #![allow(unused_variables)]
2 #![allow(non_camel_case_types)]
3 #![allow(clashing_extern_declarations)]
9 pub use extern_foo
as x
;
14 struct Foo
; //~ ERROR: struct `Foo` is never constructed
16 fn foo(&self) { //~ ERROR: associated function `foo` is never used
21 fn bar() { //~ ERROR: function `bar` is never used
30 impl Foo2 { fn foo2(&self) { bar2() }
}
39 let foo2_struct
= Foo2
;
46 // not warned because it's used in the parameter of `free` and return of
47 // `malloc` below, which are also used.
51 fn free(p
: *const c_void
);
52 fn malloc(size
: usize) -> *const c_void
;
56 unsafe { free(malloc(4)); }
60 enum c_void {}
//~ ERROR: enum `c_void` is never used
62 fn free(p
: *const c_void
); //~ ERROR: function `free` is never used
65 // Check provided method
71 impl Trait
for isize {}
76 fn anon_const() -> [(); {
77 fn blah() {}
//~ ERROR: function `blah` is never used
81 fn blah() {}
//~ ERROR: function `blah` is never used
87 let a
: &dyn inner
::Trait
= &1_isize
;