-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thing
Description
Summary
async_yields_async
wrongly showed macro definition instead of invocation.
Reproducer
I tried this code:
fn foo() {
async fn bar(i: i32) {}
macro_rules! call_bar {
($e:expr) => {
bar($e)
};
}
let x = async { call_bar!(5) };
}
I expected to see this happen:
--> src/main.rs:13:13
|
13 | bar($e)
| ^^^^^^^
| |
| awaitable value not awaited
| help: consider awaiting this value: `call_bar!(5).await`
Instead, this happened:
--> src/main.rs:13:13
|
13 | bar($e)
| ^^^^^^^
| |
| awaitable value not awaited
| help: consider awaiting this value: `bar($e).await`
Version
rustc 1.91.0-nightly (6ba0ce409 2025-08-21)
binary: rustc
commit-hash: 6ba0ce40941eee1ca02e9ba49c791ada5158747a
commit-date: 2025-08-21
host: x86_64-unknown-linux-gnu
release: 1.91.0-nightly
LLVM version: 21.1.0
Additional Labels
No response
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thing