1
Fork 0

Feature gate and make must_not_suspend allow-by-default

This lint is not yet ready for stable use, primarily due to false positives in edge
cases; we want to test it out more before stabilizing.
This commit is contained in:
Gus Wynn 2021-10-12 09:10:05 -07:00 committed by Mark Rousskov
parent ff0e14829e
commit 185fa56256
13 changed files with 114 additions and 16 deletions

View file

@ -323,6 +323,7 @@ declare_lint! {
///
/// ```rust
/// #![feature(must_not_suspend)]
/// #![warn(must_not_suspend)]
///
/// #[must_not_suspend]
/// struct SyncThing {}
@ -349,8 +350,9 @@ declare_lint! {
/// `MutexGuard`'s)
///
pub MUST_NOT_SUSPEND,
Warn,
Allow,
"use of a `#[must_not_suspend]` value across a yield point",
@feature_gate = rustc_span::symbol::sym::must_not_suspend;
}
declare_lint! {