reference icon indicating copy to clipboard operation
reference copied to clipboard

`if let` guards documentation

Open Kivooeo opened this issue 7 months ago • 3 comments

It’s been a while since the original PR for if let guards was opened, so I decided to take the initiative and push it a bit closer to stabilization

This PR adds some documentation — I did my best to keep it consistent with the existing docs on if guards There might still be some rough edges or small inaccuracies, so feel free to point them out

It’s also my first time contributing to the docs, so any feedback is appreciated!

Tracking issue rust-lang/rust#51114 Stabilization: https://github.com/rust-lang/rust/pull/141295

rendered

Kivooeo avatar May 10 '25 16:05 Kivooeo

@WaffleLapkin not sure if you got notifications when i update something, but i update almost all your reviews expect ones that asks to make code runnable, because im not sure if this is possible, we can remove ignore after it will stabilize, is that fine?

Kivooeo avatar May 16 '25 15:05 Kivooeo

@rustbot label -S-waiting-on-stabilization

workingjubilee avatar Jun 07 '25 21:06 workingjubilee

@ehuss could you please check last commit if this any better than before

Kivooeo avatar Jun 09 '25 22:06 Kivooeo

There probably needs to be a mention somewhere that if let guards also have temporary lifetime extension, like let statements do.

theemathas avatar Aug 11 '25 02:08 theemathas

Closing in favour of https://github.com/rust-lang/reference/pull/1957

Kivooeo avatar Aug 12 '25 09:08 Kivooeo