It’s because it has to work in pattern contexts as well, which are not expressions.
It’s because it has to work in pattern contexts as well, which are not expressions.
Yes, for example, syncing on a kernel panic could lead to data corruption (which is why we don’t do that). For the same reason REISUB is not recommended anymore: The default advice for a locked-up system should be SysRq B.
fn foo(x: i32) { match x { const { 3.pow(3) } => println!("three cubed"), _ => {} } }
But it looks like
inline_const_pat
is still unstable, onlyinline_const
in expression position is now stabilized.