Skip to content

Commit

Permalink
macros: suppress clippy::needless_return in #[tokio::main] (#6874)
Browse files Browse the repository at this point in the history
  • Loading branch information
oxalica authored Sep 28, 2024
1 parent e2e1e8e commit 2c14f88
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tokio-macros/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,9 @@ fn parse_knobs(mut input: ItemFn, is_test: bool, config: FinalConfig) -> TokenSt
};

let body_ident = quote! { body };
// This explicit `return` is intentional. See tokio-rs/tokio#4636
let last_block = quote_spanned! {last_stmt_end_span=>
#[allow(clippy::expect_used, clippy::diverging_sub_expression)]
#[allow(clippy::expect_used, clippy::diverging_sub_expression, clippy::needless_return)]
{
return #rt
.enable_all()
Expand Down

0 comments on commit 2c14f88

Please sign in to comment.