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:
parent
ff0e14829e
commit
185fa56256
13 changed files with 114 additions and 16 deletions
|
@ -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! {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue