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

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

Open
xFrednet opened this issue Jun 25, 2022 · 0 comments
Open

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

xFrednet opened this issue Jun 25, 2022 · 0 comments
Labels
C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages T-async-await Type: Issues related to async/await

Comments

@xFrednet
Copy link
Member

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

@xFrednet xFrednet added C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages A-diagnostics labels Jun 25, 2022
@flip1995 flip1995 added T-async-await Type: Issues related to async/await and removed A-diagnostics labels Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages T-async-await Type: Issues related to async/await
Projects
None yet
Development

No branches or pull requests

2 participants