rust/compiler/rustc_resolve
Matthias Krüger 464a0813d1
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``
2022-01-09 13:38:30 +01:00
..
src Rollup merge of #92510 - inquisitivecrystal:foreign-block, r=cjgillot 2022-01-09 13:38:30 +01:00
Cargo.toml Forbid hashing HIR outside of indexing. 2021-10-09 18:38:28 +02:00