Rename and expose LoopState as ControlFlow by NoraCodes · Pull Request #76204 · rust-lang/rust (original) (raw)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the break part here is intentionally the full impl Try type (Result, etc). They're definitely strange APIs, though -- break_value is something that could plausibly stabilize, but these ones probably aren't.

Maybe leave this particular impl block over in iter as non-pub so they can still be used there, but don't show up in the rustdoc? (And won't need #[unstable] since they'll be unusable outside iter.)

I've been contemplating making a pass through the implementations to use feature(try_blocks) instead of explicit Try::foo calls where possible; this PR going in would be a good impetus to go do that -- and hopefully delete these methods while I'm at it.