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

Feature gate the must_not_suspend lint #89798

Closed
camelid opened this issue Oct 12, 2021 · 8 comments · Fixed by #89826
Closed

Feature gate the must_not_suspend lint #89798

camelid opened this issue Oct 12, 2021 · 8 comments · Fixed by #89826
Assignees
Labels
A-async-await Area: Async & Await A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting.
Milestone

Comments

@camelid
Copy link
Member

camelid commented Oct 12, 2021

Feature-gate the must_not_suspend lint (the attribute is already feature-gated) as #![feature(must_not_suspend_lint)]. This will have to be done before 1.57.0 is released (since that's when the lint will land).

cc #83310 (comment)

@camelid camelid added A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. A-async-await Area: Async & Await labels Oct 12, 2021
@camelid camelid added this to the 1.57.0 milestone Oct 12, 2021
@camelid
Copy link
Member Author

camelid commented Oct 12, 2021

Instructions:

@camelid camelid changed the title Feature-gate the must_not_suspend lint Feature gate the must_not_suspend lint Oct 12, 2021
@guswynn
Copy link
Contributor

guswynn commented Oct 12, 2021

I have a pr ready for this, but are we sure we want to? Having people get a lint for mutexguard use across await downstream, but only allowing nightly to annotate new types seems useful to me?

@guswynn
Copy link
Contributor

guswynn commented Oct 12, 2021

oh wait, the lint still triggers, its just the feature gate on the using lint directives! seems fine to me!

@Mark-Simulacrum
Copy link
Member

The lint should likely be allow by default unless users can disable it somehow in a stable way (otherwise it's a real annoyance, needing e.g. allow(warnings) to get rid of it). The main reason to feature gate + allow by default it initially is to make sure the decision to stabilize surface area is intentional, whereas it sounds like here we did so more or less by accident.

@guswynn
Copy link
Contributor

guswynn commented Oct 14, 2021

@Mark-Simulacrum that is covered by this pr: #89787

I believe both landing is what we want for now!

@eholk
Copy link
Contributor

eholk commented Oct 18, 2021

@rustbot label +AsyncAwait-triaged

@rustbot rustbot added the AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting. label Oct 18, 2021
@bors bors closed this as completed in c654005 Nov 1, 2021
@camelid
Copy link
Member Author

camelid commented Nov 1, 2021

Re-opening to track beta-backport.

@camelid camelid reopened this Nov 1, 2021
@cuviper
Copy link
Member

cuviper commented Nov 19, 2021

Backported in #90938.

@cuviper cuviper closed this as completed Nov 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-async-await Area: Async & Await A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants