Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
1 change: 1 addition & 0 deletions src/clang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
7 changes: 7 additions & 0 deletions tests/expectations/tests/template_partial_specification.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* automatically generated by rust-bindgen */


#![allow(non_snake_case)]



10 changes: 10 additions & 0 deletions tests/headers/template_partial_specification.hpp
Original file line number Diff line number Diff line change
@@ -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;
};