Temporaries which created on stack to pass an address to `scope ref` parameter would be destroyed after the "current statement/expression".
T rvalue();
void foo(scope ref T) { ... }
foo(rvalue()); // here is "current statement/expression"
// lowered to: { auto __tmp = rvalue(); foo(__tmp); __tmp.~this(); };
Note that the lifetime of taken rvalue is mostly same as non-ref parameter case.
void bar(T arg) { ... arg.~this(); }
bar(rvalue());
// the rvalue argument is moved into the function 'bar', and destroyed inside function.
Kenji Hara