Skip to content

Commit 9d59862

Browse files
committed
Don't break the build so fast for older rust versions.
1 parent f4b1309 commit 9d59862

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ name = "bindgen"
1313
readme = "README.md"
1414
repository = "https://github.com/servo/rust-bindgen"
1515
documentation = "https://docs.rs/bindgen"
16-
version = "0.21.0"
16+
version = "0.21.1"
1717
build = "build.rs"
1818

1919
[badges]

src/clang.rs

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,27 +1343,30 @@ pub fn ast_dump(c: &Cursor, depth: isize) -> CXChildVisitResult {
13431343

13441344
if let Some(refd) = c.referenced() {
13451345
if refd != *c {
1346-
println!();
1346+
println!("");
13471347
print_cursor(depth,
13481348
String::from(prefix) + "referenced.",
13491349
&refd);
1350+
print_cursor(depth, String::from(prefix) + "referenced.", &refd);
13501351
}
13511352
}
13521353

13531354
let canonical = c.canonical();
13541355
if canonical != *c {
1355-
println!();
1356+
println!("");
13561357
print_cursor(depth,
13571358
String::from(prefix) + "canonical.",
13581359
&canonical);
1360+
print_cursor(depth, String::from(prefix) + "canonical.", &canonical);
13591361
}
13601362

13611363
if let Some(specialized) = c.specialized() {
13621364
if specialized != *c {
1363-
println!();
1365+
println!("");
13641366
print_cursor(depth,
13651367
String::from(prefix) + "specialized.",
13661368
&specialized);
1369+
print_cursor(depth, String::from(prefix) + "specialized.", &specialized);
13671370
}
13681371
}
13691372
}
@@ -1396,56 +1399,56 @@ pub fn ast_dump(c: &Cursor, depth: isize) -> CXChildVisitResult {
13961399

13971400
let canonical = ty.canonical_type();
13981401
if canonical != *ty {
1399-
println!();
1402+
println!("");
14001403
print_type(depth, String::from(prefix) + "canonical.", &canonical);
14011404
}
14021405

14031406
if let Some(pointee) = ty.pointee_type() {
14041407
if pointee != *ty {
1405-
println!();
1408+
println!("");
14061409
print_type(depth, String::from(prefix) + "pointee.", &pointee);
14071410
}
14081411
}
14091412

14101413
if let Some(elem) = ty.elem_type() {
14111414
if elem != *ty {
1412-
println!();
1415+
println!("");
14131416
print_type(depth, String::from(prefix) + "elements.", &elem);
14141417
}
14151418
}
14161419

14171420
if let Some(ret) = ty.ret_type() {
14181421
if ret != *ty {
1419-
println!();
1422+
println!("");
14201423
print_type(depth, String::from(prefix) + "return.", &ret);
14211424
}
14221425
}
14231426

14241427
let named = ty.named();
14251428
if named != *ty && named.is_valid() {
1426-
println!();
1429+
println!("");
14271430
print_type(depth, String::from(prefix) + "named.", &named);
14281431
}
14291432
}
14301433

14311434
print_indent(depth, "(");
14321435
print_cursor(depth, "", c);
14331436

1434-
println!();
1437+
println!("");
14351438
let ty = c.cur_type();
14361439
print_type(depth, "type.", &ty);
14371440

14381441
let declaration = ty.declaration();
14391442
if declaration != *c && declaration.kind() != CXCursor_NoDeclFound {
1440-
println!();
1443+
println!("");
14411444
print_cursor(depth, "type.declaration.", &declaration);
14421445
}
14431446

14441447
// Recurse.
14451448
let mut found_children = false;
14461449
c.visit(|s| {
14471450
if !found_children {
1448-
println!();
1451+
println!("");
14491452
found_children = true;
14501453
}
14511454
ast_dump(&s, depth + 1)

0 commit comments

Comments
 (0)