mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-09 00:00:08 +02:00
macros: suppress clippy::needless_return in #[tokio::main] (#6874)
This commit is contained in:
@@ -438,8 +438,9 @@ fn parse_knobs(mut input: ItemFn, is_test: bool, config: FinalConfig) -> TokenSt
|
|||||||
};
|
};
|
||||||
|
|
||||||
let body_ident = quote! { body };
|
let body_ident = quote! { body };
|
||||||
|
// This explicit `return` is intentional. See tokio-rs/tokio#4636
|
||||||
let last_block = quote_spanned! {last_stmt_end_span=>
|
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
|
return #rt
|
||||||
.enable_all()
|
.enable_all()
|
||||||
|
|||||||
Reference in New Issue
Block a user