Repository: rust
Issue: Tracking Issue for `must_not_suspend` lint (RFC #3014)
Labels: A-lints,B-RFC-approved,C-tracking-issue,A-async-await,AsyncAwait-Triaged

<!--
NOTE: For library features, please use the "Library Tracking Issue" template instead.

Thank you for creating a tracking issue! 📜 Tracking issues are for tracking a
feature from implementation to stabilisation. Make sure to include the relevant
RFC for the feature if it has one. Otherwise provide a short summary of the
feature and link any relevant PRs or issues, and remove any sections that are
not relevant to the feature.

Remember to add team labels to the tracking issue.
For a language team feature, this would e.g., be `T-lang`.
Such a feature should also be labeled with e.g., `F-my_feature`.
This label is used to associate issues (e.g., bugs and design questions) to the feature.
-->

This is a tracking issue for the RFC 3014 (rust-lang/rfcs#3014).
The feature gate for the issue is `#![feature(must_not_await_lint)]`.

**Status**: This is waiting on more precise generator captures to reduce false positives before stabilizing and turning the lint on by default.

### About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however *not* meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

### Steps
<!--
Include each step required to complete the feature. Typically this is a PR
implementing a feature, followed by a PR that stabilises the feature. However
for larger features an implementation could be broken up into multiple PRs.
-->

- [x] Implement the RFC (cc @rust-lang/compiler -- can anyone write up mentoring
      instructions?)
- [ ] Improve generator drop tracking (#57478, #69663)
- [ ] Adjust documentation ([see instructions on rustc-dev-guide][doc-guide])
- [ ] Stabilization PR ([see instructions on rustc-dev-guide][stabilization-guide])

[stabilization-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#stabilization-pr
[doc-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#documentation-prs

### Unresolved Questions
<!--
Include any open questions that need to be answered before the feature can be
stabilised.
-->

* Propagate the lint in nested structs/enums. Similar to the use case for the must_use attribute. These likely should be solved together.
* Should the implementation be done with an auto trait, to avoid the need for the hand-written logic for walking types like tuples and arrays. This would also solve the nesting problem above.
* The diagnostics should be improved when the lint triggers on async fn calls that don't obviously store a must_not_suspend type (see https://github.com/rust-lang/rust/blob/08e026675ee38bb4ca81106e766a6456c8b7382e/src/test/ui/lint/must_not_suspend/dedup.rs)

### Implementation history

<!--
Include a list of all the PRs that were involved in implementing the feature.
-->

* #88865
* #89826


<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"bIgBV"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->