Josh Triplett
Josh Triplett
Shall we stabilize `let else` syntax? We've had many demonstrated uses, including extensively throughout `rust-lang/rust`, we've seen the value of it, and there aren't any known issues with it. @rfcbot...
@nikomatsakis Extending the writeup to incorporate discussion of desugaring does seem important, since that evolved over time. However, I don't think this needs to cover destructuring assignment; at most that...
@mark-i-m That specific issue, along with other possible syntaxes, was discussed fairly extensively on the RFC thread. It's never too late as long as a feature hasn't been stabilized yet,...
The handling and lifetimes of temporaries should be exactly the same with let and with let else; any understanding or intuitions that people have about let should apply to let...
@rfcbot concern semicolon Several people have independently made the point that most braced blocks of code in Rust don't require a trailing semicolon, and that people are likely to regularly...
@Fishrock123 Thank you for that detailed response! While I don't think we're going to add destructuring-assignment-else (largely *because* it isn't as distinctly identified), even without that I agree with your...
What's the current state of the consistency issue between `let` and `let else` for handling temporary lifetimes?
This came up in today's @rust-lang/lang meeting. One notable consideration: should we enable this by default, and with what threshold?
Sounds reasonable to me. And yes, I think the most obvious thresholds would be something like 1k or 4k.
I think, for a first pass, we should just have a single lint, and set the threshold high enough that people won't typically encounter it (e.g. 1k). If we find...