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)
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.