diff options
-rw-r--r-- | Cargo.lock | 2 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/clang.rs | 1 | ||||
-rw-r--r-- | tests/expectations/tests/template_partial_specification.rs | 7 | ||||
-rw-r--r-- | tests/headers/template_partial_specification.hpp | 10 |
5 files changed, 20 insertions, 2 deletions
@@ -1,6 +1,6 @@ [root] name = "bindgen" -version = "0.21.2" +version = "0.21.3" 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)", @@ -13,7 +13,7 @@ name = "bindgen" readme = "README.md" repository = "https://github.com/servo/rust-bindgen" documentation = "https://docs.rs/bindgen" -version = "0.21.2" +version = "0.21.3" build = "build.rs" exclude = ["tests/headers", "tests/expectations", "bindgen-integration", "ci"] diff --git a/src/clang.rs b/src/clang.rs index 5da42b52..e62ff74c 100644 --- a/src/clang.rs +++ b/src/clang.rs @@ -225,6 +225,7 @@ impl Cursor { /// remaining free template arguments? pub fn is_fully_specialized_template(&self) -> bool { self.is_template_specialization() && + self.kind() != CXCursor_ClassTemplatePartialSpecialization && self.num_template_args().unwrap_or(0) > 0 } diff --git a/tests/expectations/tests/template_partial_specification.rs b/tests/expectations/tests/template_partial_specification.rs new file mode 100644 index 00000000..b4b7b2bc --- /dev/null +++ b/tests/expectations/tests/template_partial_specification.rs @@ -0,0 +1,7 @@ +/* automatically generated by rust-bindgen */ + + +#![allow(non_snake_case)] + + + diff --git a/tests/headers/template_partial_specification.hpp b/tests/headers/template_partial_specification.hpp new file mode 100644 index 00000000..fe1be658 --- /dev/null +++ b/tests/headers/template_partial_specification.hpp @@ -0,0 +1,10 @@ +// bindgen-flags: -- --target=x86_64-pc-win32 + +template<typename Method, bool Cancelable> +struct nsRunnableMethodTraits; + +template<class C, typename R, bool Cancelable, typename... As> +struct nsRunnableMethodTraits<R(C::*)(As...), Cancelable> +{ + static const bool can_cancel = Cancelable; +}; |