What is const _: () = {} and should you use it?
I've come across some Rust code that includes a snippet that looks like the following (simplified):
const _: () = {
// ...
// test MIN
assert!(unwrap!(I24Repr::try_from_i32(I24Repr::MIN)).to_i32() == I24Repr::MIN);
}
I suppose it can be seen as a test that runs during compile time, but is there any benefit in doing it this way? Is this recommended at all?