Auto merge of #18067 - Veykril:prevent-mir-building, r=Veykril

fix: Properly prevent mir building with unknown types present