Skip to content

Fix lint attributes/emission location for await_holding_* lints #9047

@xFrednet

Description

@xFrednet

Description

The lints: await_holding_lock, await_holding_refcell and await_holding_invalid_type. Are currently emitted at the function they are in, while the diagnostic highlights an expression inside the function. This means that lint attributes only work on the function and not on the displayed expression. This also affects the #[expect] attribute, which will not be fulfilled, if added to the displayed expression.

Version

rustc 1.63.0-nightly (b31f9cc22 2022-06-15)
binary: rustc
commit-hash: b31f9cc22bcd720b37ddf927afe378108a5b9a54
commit-date: 2022-06-15
host: x86_64-unknown-linux-gnu
release: 1.63.0-nightly
LLVM version: 14.0.5

Additional Labels

This issue is part of rust-lang/rust#97660

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesT-async-awaitType: Issues related to async/await

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions