Skip to content

Commit 743283d

Browse files
authored
attributes: add visibility to async-trait output (#977)
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
1 parent 106e251 commit 743283d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tracing-attributes/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,12 @@ pub fn instrument(
285285
}
286286
}
287287

288+
let vis = &input.vis;
288289
let sig = &input.sig;
289290
let attrs = &input.attrs;
290291
quote!(
291292
#(#attrs) *
292-
#sig {
293+
#vis #sig {
293294
#(#stmts) *
294295
}
295296
)

0 commit comments

Comments
 (0)