summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-02-03 21:20:59 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-02-04 09:48:01 +0100
commit1228df657da852473afac69e14e7cc544ab27423 (patch)
tree611772a1571057751cb688404fbf123a2894b1b4
parent4f753df17dcf2c24cfd0484c66bc470e289e75e4 (diff)
Don't break the build so fast for older rust versions.
-rw-r--r--Cargo.lock2
-rw-r--r--Cargo.toml2
-rw-r--r--src/clang.rs25
3 files changed, 16 insertions, 13 deletions
diff --git a/Cargo.lock b/Cargo.lock
index a6a7de64..0acb10e8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,6 +1,6 @@
[root]
name = "bindgen"
-version = "0.21.1"
+version = "0.21.2"
dependencies = [
"aster 0.38.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
diff --git a/Cargo.toml b/Cargo.toml
index d9941147..5f82c494 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@ name = "bindgen"
readme = "README.md"
repository = "https://github.com/servo/rust-bindgen"
documentation = "https://docs.rs/bindgen"
-version = "0.21.1"
+version = "0.21.2"
build = "build.rs"
exclude = ["tests/headers", "tests/expectations"]
diff --git a/src/clang.rs b/src/clang.rs
index 7e6c357b..8741663d 100644
--- a/src/clang.rs
+++ b/src/clang.rs
@@ -1366,27 +1366,30 @@ pub fn ast_dump(c: &Cursor, depth: isize) -> CXChildVisitResult {
if let Some(refd) = c.referenced() {
if refd != *c {
- println!();
+ println!("");
print_cursor(depth,
String::from(prefix) + "referenced.",
&refd);
+ print_cursor(depth, String::from(prefix) + "referenced.", &refd);
}
}
let canonical = c.canonical();
if canonical != *c {
- println!();
+ println!("");
print_cursor(depth,
String::from(prefix) + "canonical.",
&canonical);
+ print_cursor(depth, String::from(prefix) + "canonical.", &canonical);
}
if let Some(specialized) = c.specialized() {
if specialized != *c {
- println!();
+ println!("");
print_cursor(depth,
String::from(prefix) + "specialized.",
&specialized);
+ print_cursor(depth, String::from(prefix) + "specialized.", &specialized);
}
}
}
@@ -1419,34 +1422,34 @@ pub fn ast_dump(c: &Cursor, depth: isize) -> CXChildVisitResult {
let canonical = ty.canonical_type();
if canonical != *ty {
- println!();
+ println!("");
print_type(depth, String::from(prefix) + "canonical.", &canonical);
}
if let Some(pointee) = ty.pointee_type() {
if pointee != *ty {
- println!();
+ println!("");
print_type(depth, String::from(prefix) + "pointee.", &pointee);
}
}
if let Some(elem) = ty.elem_type() {
if elem != *ty {
- println!();
+ println!("");
print_type(depth, String::from(prefix) + "elements.", &elem);
}
}
if let Some(ret) = ty.ret_type() {
if ret != *ty {
- println!();
+ println!("");
print_type(depth, String::from(prefix) + "return.", &ret);
}
}
let named = ty.named();
if named != *ty && named.is_valid() {
- println!();
+ println!("");
print_type(depth, String::from(prefix) + "named.", &named);
}
}
@@ -1454,13 +1457,13 @@ pub fn ast_dump(c: &Cursor, depth: isize) -> CXChildVisitResult {
print_indent(depth, "(");
print_cursor(depth, "", c);
- println!();
+ println!("");
let ty = c.cur_type();
print_type(depth, "type.", &ty);
let declaration = ty.declaration();
if declaration != *c && declaration.kind() != CXCursor_NoDeclFound {
- println!();
+ println!("");
print_cursor(depth, "type.declaration.", &declaration);
}
@@ -1468,7 +1471,7 @@ pub fn ast_dump(c: &Cursor, depth: isize) -> CXChildVisitResult {
let mut found_children = false;
c.visit(|s| {
if !found_children {
- println!();
+ println!("");
found_children = true;
}
ast_dump(&s, depth + 1)