Add must_use attribute to Coroutine trait · patricklam/verify-rust-std@ac682f1 (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
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 | /// |