Skip to content

Commit

Permalink
Suppress clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Aug 8, 2022
1 parent 995561d commit 74aa64c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tracing-attributes/src/expand.rs
Expand Up @@ -55,8 +55,9 @@ pub(crate) fn gen_function<'a, B: ToTokens + 'a>(
// Install a fake return statement as the first thing in the function
// body, so that we eagerly infer that the return type is what we
// declared in the async fn signature.
// The `#[allow(unreachable_code)]` is given because the return
// statement is unreachable, but does affect inference.
// The `#[allow(..)]` is given because the return statement is
// unreachable, but does affect inference, so it needs to be written
// exactly that way for it to do its magic.
let fake_return_edge = quote_spanned! {return_type.span()=>
#[allow(unreachable_code, clippy::diverging_sub_expression)]
if false {
Expand Down

0 comments on commit 74aa64c

Please sign in to comment.