From: Matthias Krüger Date: Sun, 9 Jan 2022 12:38:30 +0000 (+0100) Subject: Rollup merge of #92510 - inquisitivecrystal:foreign-block, r=cjgillot X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=464a0813d122a43fdafd99a396d2d9b8482d7891;p=rust.git Rollup merge of #92510 - inquisitivecrystal:foreign-block, r=cjgillot Don't resolve blocks in foreign functions Although it is an error for a foreign function to have a block, it is still possible at the level of the AST. #74204 made AST lowering skip over blocks belonging to foreign functions, since they're invalid. However, resolve still treated these blocks normally, resulting in a mismatch between the HIR and resolve, which could cause an ICE under certain circumstances. This PR changes resolve to skip over blocks belonging to foreign functions, as AST lowering does. Fixes #91370. r? ``@cjgillot`` --- 464a0813d122a43fdafd99a396d2d9b8482d7891