TIL that 0 ..= 92
is valid pattern (playground) which means the same as 0 ... 92
. Which syntax is the preferred one? Do we plan to deprecate the other?
I also think that this wasn’t mentioned in release notes for 1.26, when this was stabilized?
TIL that 0 ..= 92
is valid pattern (playground) which means the same as 0 ... 92
. Which syntax is the preferred one? Do we plan to deprecate the other?
I also think that this wasn’t mentioned in release notes for 1.26, when this was stabilized?
Googling around more turns up this issue which suggests that ..=
is the way to go and that ...
is deprecated in the idioms lint group.
It’s been mentioned in the release blog post as well as in the release notes.
That is for ranges (std::ops::RangeInclusive), not for patterns.
Oops, I see. Spoke too soon. Sorry for the noise.
This topic was automatically closed after 26 hours. New replies are no longer allowed.