summaryrefslogtreecommitdiff
path: root/src/codegen/mod.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2017-03-21 14:04:22 +0100
committerSimon Sapin <simon.sapin@exyr.org>2017-03-21 14:46:39 +0100
commit1abd864972012b2c027fc3378f1db88333f5d6ea (patch)
tree1fdebd2086ef42e46e241ae09161f7552123de0d /src/codegen/mod.rs
parentcc6f3b251a495ca68aaad4eb49d5469898bbbe80 (diff)
Do not derive Default on vtable types
https://github.com/servo/rust-bindgen/pull/597#issuecomment-288006557
Diffstat (limited to 'src/codegen/mod.rs')
-rw-r--r--src/codegen/mod.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs
index 7db083e7..577b8aab 100644
--- a/src/codegen/mod.rs
+++ b/src/codegen/mod.rs
@@ -706,11 +706,7 @@ impl<'a> CodeGenerator for Vtable<'a> {
assert_eq!(item.id(), self.item_id);
// For now, generate an empty struct, later we should generate function
// pointers and whatnot.
- let mut attributes = vec![attributes::repr("C")];
-
- if ctx.options().derive_default {
- attributes.push(attributes::derives(&["Default"]))
- }
+ let attributes = vec![attributes::repr("C")];
let vtable = aster::AstBuilder::new()
.item()