Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macros: Improve IDE support #6968

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
macro: fixed needless lint
nurmohammed840 committed Nov 21, 2024
commit 0824f9a5a7e8b3a96315bf7d82d9acbf62bf1885
10 changes: 2 additions & 8 deletions tokio-macros/src/entry.rs
Original file line number Diff line number Diff line change
@@ -427,14 +427,8 @@ fn fn_without_args(mut input: ItemFn, is_test: bool, config: FinalConfig) -> Tok

// This explicit `return` is intentional. See tokio-rs/tokio#4636
let last_block = quote! {
#[allow(clippy::expect_used, clippy::diverging_sub_expression, clippy::needless_return)]
{
return #rt
.enable_all()
.build()
.expect("Failed building the Runtime")
.block_on(body);
}
#[allow(clippy::expect_used, clippy::diverging_sub_expression)]
#rt.enable_all().build().expect("Failed building the Runtime").block_on(body)
};

let body = input.body;
1 change: 0 additions & 1 deletion tokio/tests/macros_test.rs
Original file line number Diff line number Diff line change
@@ -42,7 +42,6 @@ fn trait_method() {

// https://github.com/tokio-rs/tokio/issues/4175
#[tokio::main]
#[allow(unreachable_code)]
pub async fn issue_4175_main_1() -> ! {
panic!();
}
Loading