Skip to content

Commit 74aa64c

Browse files
Suppress clippy warning
1 parent 995561d commit 74aa64c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tracing-attributes/src/expand.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ pub(crate) fn gen_function<'a, B: ToTokens + 'a>(
5555
// Install a fake return statement as the first thing in the function
5656
// body, so that we eagerly infer that the return type is what we
5757
// declared in the async fn signature.
58-
// The `#[allow(unreachable_code)]` is given because the return
59-
// statement is unreachable, but does affect inference.
58+
// The `#[allow(..)]` is given because the return statement is
59+
// unreachable, but does affect inference, so it needs to be written
60+
// exactly that way for it to do its magic.
6061
let fake_return_edge = quote_spanned! {return_type.span()=>
6162
#[allow(unreachable_code, clippy::diverging_sub_expression)]
6263
if false {

0 commit comments

Comments
 (0)