diff options
author | Emilio Cobos Álvarez <me@emiliocobos.me> | 2016-04-15 19:00:59 +0200 |
---|---|---|
committer | Emilio Cobos Álvarez <me@emiliocobos.me> | 2016-04-15 19:00:59 +0200 |
commit | eb75c101032184a24b752dddd3a0af35f7de3da0 (patch) | |
tree | f7708e5d7eda4931c3615126bf3ad637f99016fd | |
parent | a953f1f6d56b3a1cc94c27cae5dcf0f9045f9a8e (diff) |
types: Minor nits for is_opaque() and can_derive_debug()
-rw-r--r-- | src/types.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/types.rs b/src/types.rs index faaa0cae..c01f5b3e 100644 --- a/src/types.rs +++ b/src/types.rs @@ -215,7 +215,7 @@ impl Type { match *self { TArray(ref t, _, _) => t.is_opaque(), TPtr(ref t, _, _, _) => t.is_opaque(), - TNamed(ref ti) => ti.borrow().ty.is_opaque(), + TNamed(ref ti) => ti.borrow().opaque || ti.borrow().ty.is_opaque(), TComp(ref ci) => ci.borrow().is_opaque(), _ => false, } @@ -368,7 +368,7 @@ impl CompInfo { } pub fn can_derive_debug(&self) -> bool { - if self.hide || self.opaque { + if self.hide || self.is_opaque() { return false; } |