Okay, that at least it's some argument. I'm not terribly convinced by it; the rustfix
is next to trivial and the compiler should be able to provide a helpful and relevant error message, so even if people use outdated guides, eventually they'll get it right.
First of all, I think you're being inconsistent about your preference for consistency.
Second of all, !
isn't all that special; it's just a fancy empty enum. A couple of posts later I gave a more general example with Result
, of basically the same problem that the generator would be able to unreasonably constrain the type that the loop can return, which would have to be worked around with combinators (and in the motivating use case, no less). !
is just a particularly striking example of this. When every single use case brought up for the feature necessitates the addition of special cases and extra constructs like combinators, it should make you question whether it was well-designed in the first place.
(I realise that I will never convince some people by appealing to conceptual purity. But this is what ignoring conceptual purity looks like.)
Well, much like @RustyYato, I'd prefer if break
worked consistently, but I might accept this solution as a concession to backwards compatibility.