summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-07-31 16:19:05 -0500
committerGitHub <noreply@github.com>2017-07-31 16:19:05 -0500
commit09abb26c14ec5ea749d0a8b3538af95770946b15 (patch)
treeb1d5b038676f262def0fd80b10142db8844db89d
parentd1d35007c0e2d085ae8fa4f81573e2f45ec95643 (diff)
parent7388cb58d9e66d157dc75d2982b50a5cb0c56e61 (diff)
Auto merge of #873 - photoszzt:cleanup_derive_debug, r=fitzgen
Clean up left over derive debug nits r? @fitzgen
-rw-r--r--src/ir/context.rs14
-rw-r--r--src/ir/item.rs4
2 files changed, 8 insertions, 10 deletions
diff --git a/src/ir/context.rs b/src/ir/context.rs
index d9281a23..aea9b803 100644
--- a/src/ir/context.rs
+++ b/src/ir/context.rs
@@ -180,7 +180,7 @@ pub struct BindgenContext<'ctx> {
///
/// This is populated when we enter codegen by `compute_can_derive_debug`
/// and is always `None` before that and `Some` after.
- cant_derive_debug: Option<HashSet<ItemId>>,
+ cannot_derive_debug: Option<HashSet<ItemId>>,
/// The set of (`ItemId`s of) types that can't derive default.
///
@@ -318,7 +318,7 @@ impl<'ctx> BindgenContext<'ctx> {
used_template_parameters: None,
need_bitfield_allocation: Default::default(),
needs_mangling_hack: needs_mangling_hack,
- cant_derive_debug: None,
+ cannot_derive_debug: None,
cannot_derive_default: None,
have_vtable: None,
};
@@ -793,7 +793,7 @@ impl<'ctx> BindgenContext<'ctx> {
self.compute_has_vtable();
self.find_used_template_parameters();
- self.compute_cant_derive_debug();
+ self.compute_cannot_derive_debug();
self.compute_cannot_derive_default();
let ret = cb(self);
@@ -1762,9 +1762,9 @@ impl<'ctx> BindgenContext<'ctx> {
}
/// Compute whether we can derive debug.
- fn compute_cant_derive_debug(&mut self) {
- assert!(self.cant_derive_debug.is_none());
- self.cant_derive_debug = Some(analyze::<CannotDeriveDebug>(self));
+ fn compute_cannot_derive_debug(&mut self) {
+ assert!(self.cannot_derive_debug.is_none());
+ self.cannot_derive_debug = Some(analyze::<CannotDeriveDebug>(self));
}
/// Look up whether the item with `id` can
@@ -1775,7 +1775,7 @@ impl<'ctx> BindgenContext<'ctx> {
// Look up the computed value for whether the item with `id` can
// derive debug or not.
- !self.cant_derive_debug.as_ref().unwrap().contains(&id)
+ !self.cannot_derive_debug.as_ref().unwrap().contains(&id)
}
/// Compute whether we can derive default.
diff --git a/src/ir/item.rs b/src/ir/item.rs
index ff692fdb..8b605795 100644
--- a/src/ir/item.rs
+++ b/src/ir/item.rs
@@ -379,9 +379,8 @@ pub struct Item {
parent_id: ItemId,
/// The item kind.
kind: ItemKind,
- /// Detect cycles when determining if we can derive debug/copy or not, and
+ /// Detect cycles when determining if we can derive copy or not, and
/// avoid infinite recursion.
- detect_derive_debug_cycle: Cell<bool>,
detect_derive_copy_cycle: Cell<bool>,
}
@@ -409,7 +408,6 @@ impl Item {
comment: comment,
annotations: annotations.unwrap_or_default(),
kind: kind,
- detect_derive_debug_cycle: Cell::new(false),
detect_derive_copy_cycle: Cell::new(false),
}
}