Skip to content

Commit adb5d03

Browse files
authored
needless declarations (#2794)
* needless declarations * fix build * needless annotations
1 parent 2d293e6 commit adb5d03

18 files changed

+0
-34
lines changed

bindgen-integration/build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
extern crate bindgen;
2-
extern crate cc;
32

43
use bindgen::callbacks::{
54
DeriveInfo, IntKind, MacroParsingBehavior, ParseCallbacks,

bindgen-integration/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use std::ffi::CStr;
1212
use std::mem;
1313
use std::os::raw::c_int;
1414

15-
#[allow(unused)]
1615
use bindings::testing::Bar; // This type is generated from module_raw_line.
1716

1817
type MacroInteger = isize;

bindgen-tests/tests/expectations/tests/dynamic_loading_attributes.rs

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindgen-tests/tests/expectations/tests/dynamic_loading_required.rs

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindgen-tests/tests/expectations/tests/dynamic_loading_simple.rs

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindgen-tests/tests/expectations/tests/dynamic_loading_template.rs

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindgen-tests/tests/expectations/tests/dynamic_loading_with_allowlist.rs

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindgen-tests/tests/expectations/tests/dynamic_loading_with_blocklist.rs

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindgen-tests/tests/expectations/tests/dynamic_loading_with_class.rs

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindgen-tests/tests/expectations/tests/wrap_unsafe_ops_dynamic_loading_simple.rs

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindgen-tests/tests/quickchecking/src/bin.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
//! ```
1515
//!
1616
#![deny(missing_docs)]
17-
extern crate clap;
18-
extern crate quickchecking;
1917

2018
use clap::{Arg, ArgAction, Command};
2119
use std::path::PathBuf;

bindgen-tests/tests/quickchecking/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
//! ## Example
44
//!
55
//! ```rust
6-
//! extern crate quickcheck;
7-
//! extern crate quickchecking;
86
//! use quickcheck::{Arbitrary, Gen};
97
//! use quickchecking::fuzzers;
108
//!
@@ -20,8 +18,6 @@
2018
#![deny(missing_docs)]
2119
#[macro_use]
2220
extern crate lazy_static;
23-
extern crate quickcheck;
24-
extern crate tempfile;
2521

2622
use quickcheck::{Gen, QuickCheck, TestResult};
2723
use std::error::Error;

bindgen-tests/tests/quickchecking/tests/fuzzed-c-headers.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
extern crate quickcheck;
2-
extern crate quickchecking;
3-
41
use quickcheck::{Arbitrary, Gen};
52
use quickchecking::fuzzers::{
63
ArrayDimensionC, BaseTypeC, BasicTypeDeclarationC, DeclarationC,

bindgen-tests/tests/stylo_sanity.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// Don't want to copy that nasty `cfg` below...
2-
#[allow(unused_extern_crates)]
3-
extern crate bindgen;
4-
51
/// A sanity test that we can generate bindings for Stylo.
62
///
73
/// We don't assert on expected output because its just too big. The output will

bindgen-tests/tests/tests.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
extern crate bindgen;
2-
extern crate clap;
3-
#[cfg(feature = "logging")]
4-
extern crate env_logger;
5-
extern crate shlex;
6-
71
use bindgen::{clang_version, Builder};
82
use owo_colors::{OwoColorize, Style};
93
use similar::{ChangeTag, TextDiff};

bindgen/codegen/dyngen.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ impl DynamicItems {
9090
};
9191

9292
quote! {
93-
extern crate libloading;
94-
9593
pub struct #lib_ident {
9694
__library: ::libloading::Library,
9795
#(#struct_members)*

bindgen/features.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ impl Default for RustFeatures {
231231

232232
#[cfg(test)]
233233
mod test {
234-
#![allow(unused_imports)]
235234
use super::*;
236235

237236
#[test]

book/src/non-system-libraries.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ Given that the library has not been compiled yet, we need to modify the
1717
library:
1818

1919
```rust,ignore
20-
extern crate bindgen;
21-
2220
use std::env;
2321
use std::path::PathBuf;
2422

0 commit comments

Comments
 (0)