there are two ways to lower defer blocks
a();
defer deferred_action();
if c { return d(); }
e();
a();
if (c) {
let temp = d();
deferred_action();
return temp;
}
e();
deferred_action();
a();
try {
if (c) { return d(); }
e();
} finally {
deferred_action();
}
i think there are cases 1 will be preferred over 2, particularly when there is only defer point. try-finally seems to be a smarter approach.