summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2019-04-26 03:19:43 +0200
committerEmilio Cobos Álvarez <emilio@crisal.io>2019-04-26 03:19:43 +0200
commit39ce56bfb2ae2300f7f9b262b91b7825bb304118 (patch)
tree67de80308e6dcca5379f52c11e5972431ffdb78f /src
parent5b2f344bb02e72fd177149e3aa5d789679fa4471 (diff)
Remove redundant imports.
Diffstat (limited to 'src')
-rw-r--r--src/codegen/helpers.rs2
-rw-r--r--src/ir/comp.rs3
-rw-r--r--src/ir/context.rs4
-rw-r--r--src/ir/function.rs2
-rw-r--r--src/ir/item.rs2
5 files changed, 0 insertions, 13 deletions
diff --git a/src/codegen/helpers.rs b/src/codegen/helpers.rs
index 457979b6..b630a70b 100644
--- a/src/codegen/helpers.rs
+++ b/src/codegen/helpers.rs
@@ -43,8 +43,6 @@ pub mod attributes {
}
pub fn doc(comment: String) -> TokenStream {
- use std::str::FromStr;
-
// NOTE(emilio): By this point comments are already preprocessed and in
// `///` form. Quote turns them into `#[doc]` comments, but oh well.
TokenStream::from_str(&comment).unwrap()
diff --git a/src/ir/comp.rs b/src/ir/comp.rs
index 85054e5a..ba249644 100644
--- a/src/ir/comp.rs
+++ b/src/ir/comp.rs
@@ -351,7 +351,6 @@ impl Bitfield {
/// Get the mask value that when &'ed with this bitfield's allocation unit
/// produces this bitfield's value.
pub fn mask(&self) -> u64 {
- use std::mem;
use std::u64;
let unoffseted_mask =
@@ -1068,8 +1067,6 @@ impl CompInfo {
/// members. This is not ideal, but clang fails to report the size for these
/// kind of unions, see test/headers/template_union.hpp
pub fn layout(&self, ctx: &BindgenContext) -> Option<Layout> {
- use std::cmp;
-
// We can't do better than clang here, sorry.
if self.kind == CompKind::Struct {
return None;
diff --git a/src/ir/context.rs b/src/ir/context.rs
index 0fe720f9..f2b6956a 100644
--- a/src/ir/context.rs
+++ b/src/ir/context.rs
@@ -535,8 +535,6 @@ fn find_effective_target(clang_args: &[String]) -> (String, bool) {
impl BindgenContext {
/// Construct the context for the given `options`.
pub(crate) fn new(options: BindgenOptions) -> Self {
- use clang_sys;
-
// TODO(emilio): Use the CXTargetInfo here when available.
//
// see: https://reviews.llvm.org/D32389
@@ -1646,8 +1644,6 @@ If you encounter an error missing from this list, please file an issue or a PR!"
ty: &clang::Type,
location: clang::Cursor,
) -> Option<TypeId> {
- use clang_sys;
-
let num_expected_args = self.resolve_type(template).num_self_template_params(self);
if num_expected_args == 0 {
warn!(
diff --git a/src/ir/function.rs b/src/ir/function.rs
index dc3cfc41..4001e4d3 100644
--- a/src/ir/function.rs
+++ b/src/ir/function.rs
@@ -247,8 +247,6 @@ pub fn cursor_mangling(
ctx: &BindgenContext,
cursor: &clang::Cursor,
) -> Option<String> {
- use clang_sys;
-
if !ctx.options().enable_mangling {
return None;
}
diff --git a/src/ir/item.rs b/src/ir/item.rs
index 6df19be8..5a0bd8c9 100644
--- a/src/ir/item.rs
+++ b/src/ir/item.rs
@@ -1262,8 +1262,6 @@ impl ClangItemParser for Item {
parent_id: Option<ItemId>,
ctx: &mut BindgenContext,
) -> Result<ItemId, ParseError> {
- use ir::function::Function;
- use ir::module::Module;
use ir::var::Var;
use clang_sys::*;