Skip to content

Commit

Permalink
attributes: add visibility to async-trait output (#977)
Browse files Browse the repository at this point in the history
Instrument removes the visibility of function that looks like its
from async-trait even if its not inside a trait impl block. This
adds it back for support of proc-macros based off async-trait.

Fixes: #976
  • Loading branch information
Txuritan authored Sep 15, 2020
1 parent 106e251 commit 743283d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tracing-attributes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,12 @@ pub fn instrument(
}
}

let vis = &input.vis;
let sig = &input.sig;
let attrs = &input.attrs;
quote!(
#(#attrs) *
#sig {
#vis #sig {
#(#stmts) *
}
)
Expand Down

0 comments on commit 743283d

Please sign in to comment.