diff options
-rw-r--r-- | src/ir/analysis/derive_debug.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ir/analysis/derive_debug.rs b/src/ir/analysis/derive_debug.rs index 0f4b8365..ac2a92de 100644 --- a/src/ir/analysis/derive_debug.rs +++ b/src/ir/analysis/derive_debug.rs @@ -150,13 +150,13 @@ impl<'ctx, 'gen> MonotoneFramework for CannotDeriveDebug<'ctx, 'gen> { let layout_can_derive = ty.layout(self.ctx).map_or(true, |l| { l.opaque().can_trivially_derive_debug(self.ctx, ()) }); - if layout_can_derive { + return if layout_can_derive { trace!(" we can trivially derive Debug for the layout"); - return ConstrainResult::Same; + ConstrainResult::Same } else { trace!(" we cannot derive Debug for the layout"); - return self.insert(id); - } + self.insert(id) + }; } match *ty.kind() { |