macros: suppress clippy::needless_return in #[tokio::main] (#6874)

This commit is contained in:
oxalica 2024-09-28 06:33:51 -04:00 committed by GitHub
parent e2e1e8e71d
commit 2c14f88c90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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()