Skip to content

Commit

Permalink
Add must_use attribute to Coroutine trait
Browse files Browse the repository at this point in the history
  • Loading branch information
henryksloan committed Aug 13, 2024
1 parent db5704f commit 57aa01a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/core/src/ops/coroutine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ pub enum CoroutineState<Y, R> {
#[lang = "coroutine"]
#[unstable(feature = "coroutine_trait", issue = "43122")]
#[fundamental]
#[must_use = "coroutines are lazy and do nothing unless resumed"]
pub trait Coroutine<R = ()> {
/// The type of value this coroutine yields.
///
Expand Down

0 comments on commit 57aa01a

Please sign in to comment.