3 ms·
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)
by NieDzejkob 5y ago
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)
- remram 5y agoIt 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 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.