summaryrefslogtreecommitdiff
path: root/libbindgen/src/codegen/mod.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-12-29 09:05:54 -0800
committerGitHub <noreply@github.com>2016-12-29 09:05:54 -0800
commit889361ad3bb266ddee6edf30ba4df458a9c44022 (patch)
tree5cd8b8c4ad905997d476730de6fd054deb5d146b /libbindgen/src/codegen/mod.rs
parent0027326e16b63c9084d362ed414fef8030ca9660 (diff)
parent17e20030ea99c7ad036af1aa65110f315f13c61c (diff)
Auto merge of #371 - emilio:pointer, r=fitzgen
codegen: Use the canonical type to determine whether we should conver… …t to a pointer an argument. Fixes https://github.com/Yamakaky/rust-bindgen/issues/407 r? @fitzgen
Diffstat (limited to 'libbindgen/src/codegen/mod.rs')
-rw-r--r--libbindgen/src/codegen/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbindgen/src/codegen/mod.rs b/libbindgen/src/codegen/mod.rs
index 8b4993a8..ae59bc52 100644
--- a/libbindgen/src/codegen/mod.rs
+++ b/libbindgen/src/codegen/mod.rs
@@ -1945,7 +1945,7 @@ impl ToRustTy for FunctionSig {
// the array type derivation.
//
// [1]: http://c0x.coding-guidelines.com/6.7.5.3.html
- let arg_ty = if let TypeKind::Array(t, _) = *arg_ty.kind() {
+ let arg_ty = if let TypeKind::Array(t, _) = *arg_ty.canonical_type(ctx).kind() {
t.to_rust_ty(ctx).to_ptr(arg_ty.is_const(), ctx.span())
} else {
arg_item.to_rust_ty(ctx)