Update to rust 2018.
This commit is contained in:
parent
f245881861
commit
16fe3ec142
@ -9,6 +9,7 @@ description = "A tool for generating C bindings to Rust code."
|
||||
keywords = ["bindings", "ffi", "code-generation"]
|
||||
categories = ["external-ffi-bindings", "development-tools::ffi"]
|
||||
repository = "https://github.com/eqrion/cbindgen/"
|
||||
edition = "2018"
|
||||
|
||||
[badges]
|
||||
travis-ci = { repository = "eqrion/cbindgen" }
|
||||
|
@ -10,11 +10,11 @@ use std::io::{Read, Write};
|
||||
use std::path;
|
||||
use std::rc::Rc;
|
||||
|
||||
use bindgen::config::{Config, Language};
|
||||
use bindgen::ir::{
|
||||
use crate::bindgen::config::{Config, Language};
|
||||
use crate::bindgen::ir::{
|
||||
Constant, Function, ItemContainer, ItemMap, Path as BindgenPath, Static, Struct,
|
||||
};
|
||||
use bindgen::writer::{Source, SourceWriter};
|
||||
use crate::bindgen::writer::{Source, SourceWriter};
|
||||
|
||||
/// A bindings header that can be written.
|
||||
pub struct Bindings {
|
||||
@ -138,7 +138,7 @@ impl Bindings {
|
||||
write!(
|
||||
out,
|
||||
"/* Generated with cbindgen:{} */",
|
||||
::bindgen::config::VERSION
|
||||
crate::bindgen::config::VERSION
|
||||
);
|
||||
out.new_line();
|
||||
}
|
||||
|
@ -4,12 +4,12 @@
|
||||
|
||||
use std::path;
|
||||
|
||||
use bindgen::bindings::Bindings;
|
||||
use bindgen::cargo::Cargo;
|
||||
use bindgen::config::{Braces, Config, Language};
|
||||
use bindgen::error::Error;
|
||||
use bindgen::library::Library;
|
||||
use bindgen::parser::{self, Parse};
|
||||
use crate::bindgen::bindings::Bindings;
|
||||
use crate::bindgen::cargo::Cargo;
|
||||
use crate::bindgen::config::{Braces, Config, Language};
|
||||
use crate::bindgen::error::Error;
|
||||
use crate::bindgen::library::Library;
|
||||
use crate::bindgen::parser::{self, Parse};
|
||||
|
||||
/// A builder for generating a bindings header.
|
||||
#[derive(Debug, Clone)]
|
||||
|
@ -4,13 +4,13 @@
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use bindgen::cargo::cargo_expand;
|
||||
use bindgen::cargo::cargo_lock::{self, Lock};
|
||||
pub(crate) use bindgen::cargo::cargo_metadata::PackageRef;
|
||||
use bindgen::cargo::cargo_metadata::{self, Metadata};
|
||||
use bindgen::cargo::cargo_toml;
|
||||
use bindgen::error::Error;
|
||||
use bindgen::ir::Cfg;
|
||||
use crate::bindgen::cargo::cargo_expand;
|
||||
use crate::bindgen::cargo::cargo_lock::{self, Lock};
|
||||
pub(crate) use crate::bindgen::cargo::cargo_metadata::PackageRef;
|
||||
use crate::bindgen::cargo::cargo_metadata::{self, Metadata};
|
||||
use crate::bindgen::cargo::cargo_toml;
|
||||
use crate::bindgen::error::Error;
|
||||
use crate::bindgen::ir::Cfg;
|
||||
|
||||
/// Parse a dependency string used in Cargo.lock
|
||||
fn parse_dep_string(dep_string: &str) -> (&str, &str) {
|
||||
|
@ -4,9 +4,9 @@
|
||||
|
||||
use std::io::Write;
|
||||
|
||||
use bindgen::declarationtyperesolver::DeclarationType;
|
||||
use bindgen::ir::{Function, Type};
|
||||
use bindgen::writer::{ListType, SourceWriter};
|
||||
use crate::bindgen::declarationtyperesolver::DeclarationType;
|
||||
use crate::bindgen::ir::{Function, Type};
|
||||
use crate::bindgen::writer::{ListType, SourceWriter};
|
||||
|
||||
// This code is for translating Rust types into C declarations.
|
||||
// See Section 6.7, Declarations, in the C standard for background.
|
||||
|
@ -12,10 +12,10 @@ use serde::de::{Deserialize, Deserializer, MapAccess, SeqAccess, Visitor};
|
||||
|
||||
use toml;
|
||||
|
||||
use bindgen::ir::annotation::AnnotationSet;
|
||||
use bindgen::ir::path::Path;
|
||||
use bindgen::ir::repr::ReprAlign;
|
||||
pub use bindgen::rename::RenameRule;
|
||||
use crate::bindgen::ir::annotation::AnnotationSet;
|
||||
use crate::bindgen::ir::path::Path;
|
||||
use crate::bindgen::ir::repr::ReprAlign;
|
||||
pub use crate::bindgen::rename::RenameRule;
|
||||
|
||||
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
use std::collections::HashSet;
|
||||
|
||||
use bindgen::ir::Path;
|
||||
use crate::bindgen::ir::Path;
|
||||
|
||||
pub struct DeclarationTypeResolver {
|
||||
structs: HashSet<Path>,
|
||||
|
@ -5,7 +5,7 @@
|
||||
use std::cmp::Ordering;
|
||||
use std::collections::HashSet;
|
||||
|
||||
use bindgen::ir::{ItemContainer, Path};
|
||||
use crate::bindgen::ir::{ItemContainer, Path};
|
||||
|
||||
/// A dependency list is used for gathering what order to output the types.
|
||||
pub struct Dependencies {
|
||||
|
@ -5,9 +5,9 @@
|
||||
use std::error;
|
||||
use std::fmt;
|
||||
|
||||
pub use bindgen::cargo::cargo_expand::Error as CargoExpandError;
|
||||
pub use bindgen::cargo::cargo_metadata::Error as CargoMetadataError;
|
||||
pub use bindgen::cargo::cargo_toml::Error as CargoTomlError;
|
||||
pub use crate::bindgen::cargo::cargo_expand::Error as CargoExpandError;
|
||||
pub use crate::bindgen::cargo::cargo_metadata::Error as CargoMetadataError;
|
||||
pub use crate::bindgen::cargo::cargo_toml::Error as CargoTomlError;
|
||||
pub use syn::parse::Error as ParseError;
|
||||
|
||||
#[derive(Debug)]
|
||||
|
@ -7,7 +7,7 @@ use std::str::FromStr;
|
||||
|
||||
use syn;
|
||||
|
||||
use bindgen::utilities::SynAttributeHelpers;
|
||||
use crate::bindgen::utilities::SynAttributeHelpers;
|
||||
|
||||
// A system for specifying properties on items. Annotations are
|
||||
// given through document comments and parsed by this code.
|
||||
|
@ -7,9 +7,9 @@ use std::io::Write;
|
||||
|
||||
use syn;
|
||||
|
||||
use bindgen::cargo::cargo_metadata::Dependency;
|
||||
use bindgen::config::Config;
|
||||
use bindgen::writer::SourceWriter;
|
||||
use crate::bindgen::cargo::cargo_metadata::Dependency;
|
||||
use crate::bindgen::config::Config;
|
||||
use crate::bindgen::writer::SourceWriter;
|
||||
|
||||
#[derive(PartialEq, Eq)]
|
||||
enum DefineKey<'a> {
|
||||
|
@ -8,16 +8,16 @@ use std::io::Write;
|
||||
|
||||
use syn::{self, UnOp};
|
||||
|
||||
use bindgen::config::{Config, Language};
|
||||
use bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use bindgen::dependencies::Dependencies;
|
||||
use bindgen::ir::{
|
||||
use crate::bindgen::config::{Config, Language};
|
||||
use crate::bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use crate::bindgen::dependencies::Dependencies;
|
||||
use crate::bindgen::ir::{
|
||||
AnnotationSet, Cfg, ConditionWrite, Documentation, GenericParams, Item, ItemContainer, Path,
|
||||
Struct, ToCondition, Type,
|
||||
};
|
||||
use bindgen::library::Library;
|
||||
use bindgen::writer::{Source, SourceWriter};
|
||||
use bindgen::Bindings;
|
||||
use crate::bindgen::library::Library;
|
||||
use crate::bindgen::writer::{Source, SourceWriter};
|
||||
use crate::bindgen::Bindings;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum Literal {
|
||||
|
@ -6,9 +6,9 @@ use std::io::Write;
|
||||
|
||||
use syn;
|
||||
|
||||
use bindgen::config::{Config, DocumentationStyle, Language};
|
||||
use bindgen::utilities::SynAttributeHelpers;
|
||||
use bindgen::writer::{Source, SourceWriter};
|
||||
use crate::bindgen::config::{Config, DocumentationStyle, Language};
|
||||
use crate::bindgen::utilities::SynAttributeHelpers;
|
||||
use crate::bindgen::writer::{Source, SourceWriter};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Documentation {
|
||||
|
@ -6,19 +6,19 @@ use std::io::Write;
|
||||
|
||||
use syn;
|
||||
|
||||
use bindgen::config::{Config, Language};
|
||||
use bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use bindgen::dependencies::Dependencies;
|
||||
use bindgen::ir::{
|
||||
use crate::bindgen::config::{Config, Language};
|
||||
use crate::bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use crate::bindgen::dependencies::Dependencies;
|
||||
use crate::bindgen::ir::{
|
||||
AnnotationSet, Cfg, ConditionWrite, Documentation, GenericParams, GenericPath, Item,
|
||||
ItemContainer, Path, Repr, ReprStyle, ReprType, Struct, ToCondition, Type,
|
||||
};
|
||||
use bindgen::library::Library;
|
||||
use bindgen::mangle;
|
||||
use bindgen::monomorph::Monomorphs;
|
||||
use bindgen::rename::{IdentifierType, RenameRule};
|
||||
use bindgen::utilities::find_first_some;
|
||||
use bindgen::writer::{ListType, Source, SourceWriter};
|
||||
use crate::bindgen::library::Library;
|
||||
use crate::bindgen::mangle;
|
||||
use crate::bindgen::monomorph::Monomorphs;
|
||||
use crate::bindgen::rename::{IdentifierType, RenameRule};
|
||||
use crate::bindgen::utilities::find_first_some;
|
||||
use crate::bindgen::writer::{ListType, Source, SourceWriter};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct EnumVariant {
|
||||
|
@ -6,19 +6,19 @@ use std::io::Write;
|
||||
|
||||
use syn;
|
||||
|
||||
use bindgen::cdecl;
|
||||
use bindgen::config::{Config, Language, Layout};
|
||||
use bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use bindgen::dependencies::Dependencies;
|
||||
use bindgen::ir::{
|
||||
use crate::bindgen::cdecl;
|
||||
use crate::bindgen::config::{Config, Language, Layout};
|
||||
use crate::bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use crate::bindgen::dependencies::Dependencies;
|
||||
use crate::bindgen::ir::{
|
||||
AnnotationSet, Cfg, ConditionWrite, Documentation, Path, PrimitiveType, ToCondition, Type,
|
||||
};
|
||||
use bindgen::library::Library;
|
||||
use bindgen::monomorph::Monomorphs;
|
||||
use bindgen::rename::{IdentifierType, RenameRule};
|
||||
use bindgen::reserved;
|
||||
use bindgen::utilities::{find_first_some, IterHelpers};
|
||||
use bindgen::writer::{Source, SourceWriter};
|
||||
use crate::bindgen::library::Library;
|
||||
use crate::bindgen::monomorph::Monomorphs;
|
||||
use crate::bindgen::rename::{IdentifierType, RenameRule};
|
||||
use crate::bindgen::reserved;
|
||||
use crate::bindgen::utilities::{find_first_some, IterHelpers};
|
||||
use crate::bindgen::writer::{Source, SourceWriter};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Function {
|
||||
|
@ -3,11 +3,11 @@ use std::ops::Deref;
|
||||
|
||||
use syn;
|
||||
|
||||
use bindgen::config::{Config, Language};
|
||||
use bindgen::declarationtyperesolver::{DeclarationType, DeclarationTypeResolver};
|
||||
use bindgen::ir::{Path, Type};
|
||||
use bindgen::utilities::IterHelpers;
|
||||
use bindgen::writer::{Source, SourceWriter};
|
||||
use crate::bindgen::config::{Config, Language};
|
||||
use crate::bindgen::declarationtyperesolver::{DeclarationType, DeclarationTypeResolver};
|
||||
use crate::bindgen::ir::{Path, Type};
|
||||
use crate::bindgen::utilities::IterHelpers;
|
||||
use crate::bindgen::writer::{Source, SourceWriter};
|
||||
|
||||
#[derive(Default, Debug, Clone)]
|
||||
pub struct GenericParams(pub Vec<Path>);
|
||||
|
@ -6,12 +6,12 @@ use std::io::Write;
|
||||
|
||||
use syn;
|
||||
|
||||
use bindgen::config::Config;
|
||||
use bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use bindgen::dependencies::Dependencies;
|
||||
use bindgen::ir::{AnnotationSet, Cfg, Documentation, Item, ItemContainer, Path, Type};
|
||||
use bindgen::library::Library;
|
||||
use bindgen::writer::{Source, SourceWriter};
|
||||
use crate::bindgen::config::Config;
|
||||
use crate::bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use crate::bindgen::dependencies::Dependencies;
|
||||
use crate::bindgen::ir::{AnnotationSet, Cfg, Documentation, Item, ItemContainer, Path, Type};
|
||||
use crate::bindgen::library::Library;
|
||||
use crate::bindgen::writer::{Source, SourceWriter};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Static {
|
||||
|
@ -5,14 +5,14 @@
|
||||
use std::collections::BTreeMap;
|
||||
use std::mem;
|
||||
|
||||
use bindgen::config::Config;
|
||||
use bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use bindgen::dependencies::Dependencies;
|
||||
use bindgen::ir::{
|
||||
use crate::bindgen::config::Config;
|
||||
use crate::bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use crate::bindgen::dependencies::Dependencies;
|
||||
use crate::bindgen::ir::{
|
||||
AnnotationSet, Cfg, Constant, Enum, OpaqueItem, Path, Static, Struct, Type, Typedef, Union,
|
||||
};
|
||||
use bindgen::library::Library;
|
||||
use bindgen::monomorph::Monomorphs;
|
||||
use crate::bindgen::library::Library;
|
||||
use crate::bindgen::monomorph::Monomorphs;
|
||||
|
||||
/// An item is any type of rust item besides a function
|
||||
pub trait Item {
|
||||
|
@ -6,17 +6,17 @@ use std::io::Write;
|
||||
|
||||
use syn;
|
||||
|
||||
use bindgen::config::{Config, Language};
|
||||
use bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use bindgen::dependencies::Dependencies;
|
||||
use bindgen::ir::{
|
||||
use crate::bindgen::config::{Config, Language};
|
||||
use crate::bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use crate::bindgen::dependencies::Dependencies;
|
||||
use crate::bindgen::ir::{
|
||||
AnnotationSet, Cfg, ConditionWrite, Documentation, GenericParams, Item, ItemContainer, Path,
|
||||
ToCondition, Type,
|
||||
};
|
||||
use bindgen::library::Library;
|
||||
use bindgen::mangle;
|
||||
use bindgen::monomorph::Monomorphs;
|
||||
use bindgen::writer::{Source, SourceWriter};
|
||||
use crate::bindgen::library::Library;
|
||||
use crate::bindgen::mangle;
|
||||
use crate::bindgen::monomorph::Monomorphs;
|
||||
use crate::bindgen::writer::{Source, SourceWriter};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct OpaqueItem {
|
||||
|
@ -6,20 +6,20 @@ use std::io::Write;
|
||||
|
||||
use syn;
|
||||
|
||||
use bindgen::config::{Config, Language, LayoutConfig};
|
||||
use bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use bindgen::dependencies::Dependencies;
|
||||
use bindgen::ir::{
|
||||
use crate::bindgen::config::{Config, Language, LayoutConfig};
|
||||
use crate::bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use crate::bindgen::dependencies::Dependencies;
|
||||
use crate::bindgen::ir::{
|
||||
AnnotationSet, Cfg, ConditionWrite, Constant, Documentation, GenericParams, Item,
|
||||
ItemContainer, Path, Repr, ReprAlign, ReprStyle, ToCondition, Type, Typedef,
|
||||
};
|
||||
use bindgen::library::Library;
|
||||
use bindgen::mangle;
|
||||
use bindgen::monomorph::Monomorphs;
|
||||
use bindgen::rename::{IdentifierType, RenameRule};
|
||||
use bindgen::reserved;
|
||||
use bindgen::utilities::{find_first_some, IterHelpers};
|
||||
use bindgen::writer::{ListType, Source, SourceWriter};
|
||||
use crate::bindgen::library::Library;
|
||||
use crate::bindgen::mangle;
|
||||
use crate::bindgen::monomorph::Monomorphs;
|
||||
use crate::bindgen::rename::{IdentifierType, RenameRule};
|
||||
use crate::bindgen::reserved;
|
||||
use crate::bindgen::utilities::{find_first_some, IterHelpers};
|
||||
use crate::bindgen::writer::{ListType, Source, SourceWriter};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Struct {
|
||||
|
@ -7,15 +7,15 @@ use std::io::Write;
|
||||
|
||||
use syn;
|
||||
|
||||
use bindgen::cdecl;
|
||||
use bindgen::config::Config;
|
||||
use bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use bindgen::dependencies::Dependencies;
|
||||
use bindgen::ir::{Documentation, GenericParams, GenericPath, Path};
|
||||
use bindgen::library::Library;
|
||||
use bindgen::monomorph::Monomorphs;
|
||||
use bindgen::utilities::IterHelpers;
|
||||
use bindgen::writer::{Source, SourceWriter};
|
||||
use crate::bindgen::cdecl;
|
||||
use crate::bindgen::config::Config;
|
||||
use crate::bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use crate::bindgen::dependencies::Dependencies;
|
||||
use crate::bindgen::ir::{Documentation, GenericParams, GenericPath, Path};
|
||||
use crate::bindgen::library::Library;
|
||||
use crate::bindgen::monomorph::Monomorphs;
|
||||
use crate::bindgen::utilities::IterHelpers;
|
||||
use crate::bindgen::writer::{Source, SourceWriter};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||
pub enum PrimitiveType {
|
||||
|
@ -7,17 +7,17 @@ use std::io::Write;
|
||||
|
||||
use syn;
|
||||
|
||||
use bindgen::config::{Config, Language};
|
||||
use bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use bindgen::dependencies::Dependencies;
|
||||
use bindgen::ir::{
|
||||
use crate::bindgen::config::{Config, Language};
|
||||
use crate::bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use crate::bindgen::dependencies::Dependencies;
|
||||
use crate::bindgen::ir::{
|
||||
AnnotationSet, Cfg, ConditionWrite, Documentation, GenericParams, Item, ItemContainer, Path,
|
||||
ToCondition, Type,
|
||||
};
|
||||
use bindgen::library::Library;
|
||||
use bindgen::mangle;
|
||||
use bindgen::monomorph::Monomorphs;
|
||||
use bindgen::writer::{Source, SourceWriter};
|
||||
use crate::bindgen::library::Library;
|
||||
use crate::bindgen::mangle;
|
||||
use crate::bindgen::monomorph::Monomorphs;
|
||||
use crate::bindgen::writer::{Source, SourceWriter};
|
||||
|
||||
/// A type alias that is represented as a C typedef
|
||||
#[derive(Debug, Clone)]
|
||||
|
@ -6,20 +6,20 @@ use std::io::Write;
|
||||
|
||||
use syn;
|
||||
|
||||
use bindgen::config::{Config, Language, LayoutConfig};
|
||||
use bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use bindgen::dependencies::Dependencies;
|
||||
use bindgen::ir::SynFieldHelpers;
|
||||
use bindgen::ir::{
|
||||
use crate::bindgen::config::{Config, Language, LayoutConfig};
|
||||
use crate::bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use crate::bindgen::dependencies::Dependencies;
|
||||
use crate::bindgen::ir::SynFieldHelpers;
|
||||
use crate::bindgen::ir::{
|
||||
AnnotationSet, Cfg, ConditionWrite, Documentation, GenericParams, Item, ItemContainer, Path,
|
||||
Repr, ReprAlign, ReprStyle, ToCondition, Type,
|
||||
};
|
||||
use bindgen::library::Library;
|
||||
use bindgen::mangle;
|
||||
use bindgen::monomorph::Monomorphs;
|
||||
use bindgen::rename::{IdentifierType, RenameRule};
|
||||
use bindgen::utilities::{find_first_some, IterHelpers};
|
||||
use bindgen::writer::{ListType, Source, SourceWriter};
|
||||
use crate::bindgen::library::Library;
|
||||
use crate::bindgen::mangle;
|
||||
use crate::bindgen::monomorph::Monomorphs;
|
||||
use crate::bindgen::rename::{IdentifierType, RenameRule};
|
||||
use crate::bindgen::utilities::{find_first_some, IterHelpers};
|
||||
use crate::bindgen::writer::{ListType, Source, SourceWriter};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Union {
|
||||
|
@ -5,15 +5,15 @@
|
||||
use std::collections::HashMap;
|
||||
use std::mem;
|
||||
|
||||
use bindgen::bindings::Bindings;
|
||||
use bindgen::config::{Config, Language};
|
||||
use bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use bindgen::dependencies::Dependencies;
|
||||
use bindgen::error::Error;
|
||||
use bindgen::ir::{Constant, Enum, Function, Item, ItemContainer, ItemMap};
|
||||
use bindgen::ir::{OpaqueItem, Path, Static, Struct, Typedef, Union};
|
||||
use bindgen::monomorph::Monomorphs;
|
||||
use bindgen::ItemType;
|
||||
use crate::bindgen::bindings::Bindings;
|
||||
use crate::bindgen::config::{Config, Language};
|
||||
use crate::bindgen::declarationtyperesolver::DeclarationTypeResolver;
|
||||
use crate::bindgen::dependencies::Dependencies;
|
||||
use crate::bindgen::error::Error;
|
||||
use crate::bindgen::ir::{Constant, Enum, Function, Item, ItemContainer, ItemMap};
|
||||
use crate::bindgen::ir::{OpaqueItem, Path, Static, Struct, Typedef, Union};
|
||||
use crate::bindgen::monomorph::Monomorphs;
|
||||
use crate::bindgen::ItemType;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Library {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use bindgen::ir::{Path, Type};
|
||||
use crate::bindgen::ir::{Path, Type};
|
||||
|
||||
pub fn mangle_path(path: &Path, generic_values: &[Type]) -> Path {
|
||||
internal_mangle_path(path, generic_values, true)
|
||||
@ -64,7 +64,7 @@ fn internal_mangle_name(name: &str, generic_values: &[Type], last_in_parent: boo
|
||||
|
||||
#[test]
|
||||
fn generics() {
|
||||
use bindgen::ir::{GenericPath, PrimitiveType};
|
||||
use crate::bindgen::ir::{GenericPath, PrimitiveType};
|
||||
|
||||
fn float() -> Type {
|
||||
Type::Primitive(PrimitiveType::Float)
|
||||
|
@ -5,7 +5,7 @@
|
||||
use std::collections::HashMap;
|
||||
use std::mem;
|
||||
|
||||
use bindgen::ir::{Enum, GenericPath, OpaqueItem, Path, Struct, Type, Typedef, Union};
|
||||
use crate::bindgen::ir::{Enum, GenericPath, OpaqueItem, Path, Struct, Type, Typedef, Union};
|
||||
|
||||
#[derive(Default, Clone, Debug)]
|
||||
pub struct Monomorphs {
|
||||
|
@ -9,15 +9,15 @@ use std::path::{Path as FilePath, PathBuf as FilePathBuf};
|
||||
|
||||
use syn;
|
||||
|
||||
use bindgen::bitflags;
|
||||
use bindgen::cargo::{Cargo, PackageRef};
|
||||
use bindgen::config::{Config, ParseConfig};
|
||||
use bindgen::error::Error;
|
||||
use bindgen::ir::{
|
||||
use crate::bindgen::bitflags;
|
||||
use crate::bindgen::cargo::{Cargo, PackageRef};
|
||||
use crate::bindgen::config::{Config, ParseConfig};
|
||||
use crate::bindgen::error::Error;
|
||||
use crate::bindgen::ir::{
|
||||
AnnotationSet, Cfg, Constant, Documentation, Enum, Function, GenericParams, ItemMap,
|
||||
OpaqueItem, Path, Static, Struct, Type, Typedef, Union,
|
||||
};
|
||||
use bindgen::utilities::{SynAbiHelpers, SynItemHelpers};
|
||||
use crate::bindgen::utilities::{SynAbiHelpers, SynItemHelpers};
|
||||
|
||||
const STD_CRATES: &[&str] = &[
|
||||
"std",
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
use std::str::FromStr;
|
||||
|
||||
use bindgen::ir::{Enum, Item};
|
||||
use crate::bindgen::ir::{Enum, Item};
|
||||
|
||||
/// The type of identifier to be renamed.
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
|
@ -6,8 +6,8 @@ use std::cmp;
|
||||
use std::io;
|
||||
use std::io::Write;
|
||||
|
||||
use bindgen::config::{Braces, Config};
|
||||
use bindgen::Bindings;
|
||||
use crate::bindgen::config::{Braces, Config};
|
||||
use crate::bindgen::Bindings;
|
||||
|
||||
/// A type of way to format a list.
|
||||
pub enum ListType<'a> {
|
||||
@ -236,5 +236,5 @@ impl<'a, F: Write> SourceWriter<'a, F> {
|
||||
}
|
||||
|
||||
pub trait Source {
|
||||
fn write<F: Write>(&self, config: &Config, &mut SourceWriter<F>);
|
||||
fn write<F: Write>(&self, config: &Config, _: &mut SourceWriter<F>);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ extern crate toml;
|
||||
|
||||
mod bindgen;
|
||||
|
||||
pub use bindgen::*;
|
||||
pub use crate::bindgen::*;
|
||||
|
||||
use std::path::Path;
|
||||
|
||||
|
@ -24,7 +24,7 @@ use clap::{App, Arg, ArgMatches};
|
||||
mod bindgen;
|
||||
mod logging;
|
||||
|
||||
use bindgen::{Bindings, Builder, Cargo, Config, Error, Language, Style};
|
||||
use crate::bindgen::{Bindings, Builder, Cargo, Config, Error, Language, Style};
|
||||
|
||||
fn apply_config_overrides<'a>(config: &mut Config, matches: &ArgMatches<'a>) {
|
||||
// We allow specifying a language to override the config default. This is
|
||||
|
Loading…
x
Reference in New Issue
Block a user