Open
Description
Right now there is some mandatory boilerplate whenever using span!.
let span = span!(...);
let _something = span.enter();
It cannot be written as
span!(...).enter(); // temporary value freed at end of statement
// or
let span = span!(...);
let _ = span.enter(); // silently fails to do anything, guard is dropped immediately here
In order for it to work you must bind the span to a temporary and you must bind the guard to another ignored temporary and that cannot be _
because of rust drop semantics.
The Idea
Here enters the enter! macro.
enter!(span!(...));
which should just expand to the first example.