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 e3da824 commit ac682f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions 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 ac682f1

Please sign in to comment.