diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-11-16 19:43:09 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-16 19:43:09 -0600 |
commit | b9e15e9fc7f7100aa03256b6997639142ab38e87 (patch) | |
tree | 272cd673fca2f27f413b051eba654866b474114d /libbindgen/src/codegen/mod.rs | |
parent | e74acce09bc0f643a0084334f56837bb09f9cf42 (diff) | |
parent | 47cb4e34df94480780ea2dc4d7070eb306f1193b (diff) |
Auto merge of #273 - upsuper:const-bool, r=emilio
Generate bool value for bool constants
This also includes an unrelated commit which ensures newly-added test would be included.
Diffstat (limited to 'libbindgen/src/codegen/mod.rs')
-rw-r--r-- | libbindgen/src/codegen/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libbindgen/src/codegen/mod.rs b/libbindgen/src/codegen/mod.rs index ceb023f7..f15b92d1 100644 --- a/libbindgen/src/codegen/mod.rs +++ b/libbindgen/src/codegen/mod.rs @@ -323,6 +323,10 @@ impl CodeGenerator for Var { .const_(canonical_name) .expr(); let item = match *val { + VarType::Bool(val) => { + const_item.build(helpers::ast_ty::bool_expr(val)) + .build(ty) + } VarType::Int(val) => { const_item.build(helpers::ast_ty::int_expr(val)) .build(ty) |