From e4da7d39a6d1481420440b37dcfe85d7ea4527d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 21 Sep 2020 20:46:44 +0200 Subject: [PATCH] v0.14.6 Don't use matches!() to support older rustc versions. Fixes #574 --- CHANGES | 4 ++++ Cargo.lock | 2 +- Cargo.toml | 2 +- src/bindgen/ir/function.rs | 5 +++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index cfcba127b..add16f267 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +## 0.14.6 + + * Fixed the builds with older versions of rustc. + ## 0.14.5 * Add support to specify line ending style (#568) diff --git a/Cargo.lock b/Cargo.lock index 737c6c413..1c84f2ad5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -32,7 +32,7 @@ dependencies = [ [[package]] name = "cbindgen" -version = "0.14.5" +version = "0.14.6" dependencies = [ "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 9e057cf49..87eb38704 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cbindgen" -version = "0.14.5" +version = "0.14.6" authors = ["Jeff Muizelaar ", "Kartikaya Gupta ", "Ryan Hunt "] diff --git a/src/bindgen/ir/function.rs b/src/bindgen/ir/function.rs index d129fd476..442c4e93e 100644 --- a/src/bindgen/ir/function.rs +++ b/src/bindgen/ir/function.rs @@ -210,8 +210,9 @@ impl Function { } for arg in &mut self.args { - if !matches!(arg.ty, Type::Ptr { .. }) { - continue; + match arg.ty { + Type::Ptr { .. } => {}, + _ => continue, } let name = match arg.name { Some(ref name) => name,