Add must_use attribute to Coroutine trait · patricklam/verify-rust-std@ac682f1 (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit ac682f1

Add must_use attribute to Coroutine trait

File tree

1 file changed

lines changed

1 file changed

lines changed

Lines changed: 1 addition & 0 deletions

Original file line number Diff line number Diff line change
@@ -69,6 +69,7 @@ pub enum CoroutineState<Y, R> {
69 69 #[lang = "coroutine"]
70 70 #[unstable(feature = "coroutine_trait", issue = "43122")]
71 71 #[fundamental]
72 +#[must_use = "coroutines are lazy and do nothing unless resumed"]
72 73 pub trait Coroutine<R = ()> {
73 74 /// The type of value this coroutine yields.
74 75 ///