Closed breezewish closed 8 months ago
How about making it a new function like:
#[cfg(test)]
pub fn root_with_collect(event: &'static str, collect: GlobalCollect) -> (Self, Collector) {}
I suspect that the plugin mistakenly set cfg(test)
to true
for doctest.
I also see this behavior in the VS-Code IDE.
Not sure what the plans are for the collect:
parameter.... if it is intended to allow this to be passed-in, in the future, you could have it as an optional parameter for the intervening period (where tests are the only use case):
pub fn root(event: &'static str, collect: Option<GlobalCollect>)
Then default usage would, until that time arrives, be Span::root("root", None)
Collating functions similarly affected:
root
enter_with_local_parent
With latest intellij-rust (14 Feb 2022), the IDE doesn't work well for such functions: