Closed
Description
This might seem a bit strange but not allowing them has brought up some strange results for me.
The equivalent can be done with a plain match statement which is defiantly not as clean. In the docs it says to just use a plane let
statement, but that is not always possible because of macros. If you accept a pattern in a macro then the ability to have the following -
if let $p = $val {
$b
}
instead of
#[allow(unreachable_patterns)]
match $val {
$p => {
$b;
break;
},
_ => ()
}