dtolnay / async-trait

Type erasure for async trait methods
Apache License 2.0
1.84k stars 85 forks source link

Add a "reverse" test to prevent breakage of the `tracing` crate #97

Closed nightmared closed 4 years ago

nightmared commented 4 years ago

This PR intends to allow detecting future breakage of the tracing crate and should allow us to finally close the bug #45.

To put in a it more context, the #[tracing::instrument] proc-macro is currently detecting whether the function the user wishes to instrument was generated by async-trait, and to instrument the internal async fn in such case, instead of the wrapper generated by async-trait.

Until recently, tracing didn't have that detection mecanism, but since this was recently added in tracing-attributes 0.1.8 (or tracing 0.1.14), it makes sense to add some tests here too to help detect early breaking changes.