diff options
author | Xidorn Quan <me@upsuper.org> | 2017-02-10 12:13:42 +1100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-02-10 14:04:59 +0100 |
commit | c952b14b651e45e4ad5d438c2c10e329d804e9bf (patch) | |
tree | e66da56e86dacaabd761180f7420d6a9d10e90db | |
parent | 0001606737c305eff1bb84162f95023a11bcc055 (diff) |
Don't mangle name in partial specification
-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 bcb22e06..84609ca6 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; +}; |