News for hackers. Stuff that matters.
Re:Compiling Rust is NP-hard by NieDzejkob on Thursday July 08, 2021 @06:40AM (#27770287)
It still needs to ensure that one of the arms will always match. (just not executing any branch in that case is tricky, because the arms can return values)
Re:Compiling Rust is NP-hard by remram on Thursday July 08, 2021 @09:47AM (#27771883)
It does not need to check, if it assumes it. mrustc works that way, it is not trying to check code, only compile valid code: https://github.com/thepowersgang/mrustc

This is similar to C/C++'s " undefined behaviors". There are things you can write that aren't valid for the language, but that compilers are not required to catch.