Skip to content

Commit

Permalink
needless declarations (#2794)
Browse files Browse the repository at this point in the history
* needless declarations

* fix build

* needless annotations
  • Loading branch information
tshepang authored Apr 1, 2024
1 parent 2d293e6 commit adb5d03
Show file tree
Hide file tree
Showing 18 changed files with 0 additions and 34 deletions.
1 change: 0 additions & 1 deletion bindgen-integration/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
extern crate bindgen;
extern crate cc;

use bindgen::callbacks::{
DeriveInfo, IntKind, MacroParsingBehavior, ParseCallbacks,
Expand Down
1 change: 0 additions & 1 deletion bindgen-integration/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use std::ffi::CStr;
use std::mem;
use std::os::raw::c_int;

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

type MacroInteger = isize;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions bindgen-tests/tests/quickchecking/src/bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
//! ```
//!
#![deny(missing_docs)]
extern crate clap;
extern crate quickchecking;

use clap::{Arg, ArgAction, Command};
use std::path::PathBuf;
Expand Down
4 changes: 0 additions & 4 deletions bindgen-tests/tests/quickchecking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
//! ## Example
//!
//! ```rust
//! extern crate quickcheck;
//! extern crate quickchecking;
//! use quickcheck::{Arbitrary, Gen};
//! use quickchecking::fuzzers;
//!
Expand All @@ -20,8 +18,6 @@
#![deny(missing_docs)]
#[macro_use]
extern crate lazy_static;
extern crate quickcheck;
extern crate tempfile;

use quickcheck::{Gen, QuickCheck, TestResult};
use std::error::Error;
Expand Down
3 changes: 0 additions & 3 deletions bindgen-tests/tests/quickchecking/tests/fuzzed-c-headers.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
extern crate quickcheck;
extern crate quickchecking;

use quickcheck::{Arbitrary, Gen};
use quickchecking::fuzzers::{
ArrayDimensionC, BaseTypeC, BasicTypeDeclarationC, DeclarationC,
Expand Down
4 changes: 0 additions & 4 deletions bindgen-tests/tests/stylo_sanity.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Don't want to copy that nasty `cfg` below...
#[allow(unused_extern_crates)]
extern crate bindgen;

/// A sanity test that we can generate bindings for Stylo.
///
/// We don't assert on expected output because its just too big. The output will
Expand Down
6 changes: 0 additions & 6 deletions bindgen-tests/tests/tests.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
extern crate bindgen;
extern crate clap;
#[cfg(feature = "logging")]
extern crate env_logger;
extern crate shlex;

use bindgen::{clang_version, Builder};
use owo_colors::{OwoColorize, Style};
use similar::{ChangeTag, TextDiff};
Expand Down
2 changes: 0 additions & 2 deletions bindgen/codegen/dyngen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ impl DynamicItems {
};

quote! {
extern crate libloading;

pub struct #lib_ident {
__library: ::libloading::Library,
#(#struct_members)*
Expand Down
1 change: 0 additions & 1 deletion bindgen/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ impl Default for RustFeatures {

#[cfg(test)]
mod test {
#![allow(unused_imports)]
use super::*;

#[test]
Expand Down
2 changes: 0 additions & 2 deletions book/src/non-system-libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ Given that the library has not been compiled yet, we need to modify the
library:

```rust,ignore
extern crate bindgen;
use std::env;
use std::path::PathBuf;
Expand Down

0 comments on commit adb5d03

Please sign in to comment.