From ee1d2ea3b73d07d95d5c22ccd1e884e3674fcec6 Mon Sep 17 00:00:00 2001 From: Gus Wynn Date: Sat, 11 Sep 2021 12:39:33 -0700 Subject: [PATCH] fix doctests --- compiler/rustc_lint_defs/src/builtin.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs index 0463cb2b7655..781ac6a14a4b 100644 --- a/compiler/rustc_lint_defs/src/builtin.rs +++ b/compiler/rustc_lint_defs/src/builtin.rs @@ -327,14 +327,16 @@ declare_lint! { /// ### Example /// /// ```rust + /// #![feature(must_not_suspend)] + /// /// #[must_not_suspend] /// struct SyncThing {} /// - /// async fn yield() {} + /// async fn yield_now() {} /// /// pub async fn uhoh() { /// let guard = SyncThing {}; - /// yield().await; + /// yield_now().await; /// } /// ``` pub MUST_NOT_SUSPEND,