rust/compiler/rustc_resolve/src
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
..
late Tighten span when suggesting lifetime on path 2021-12-27 23:34:52 -08:00
build_reduced_graph.rs ast: Always keep a NodeId in ast::Crate 2022-01-05 17:09:37 +08:00
check_unused.rs suggest adding a #[cfg(test)] to test modules 2021-12-16 11:48:58 +09:00
def_collector.rs ast: Always keep a NodeId in ast::Crate 2022-01-05 17:09:37 +08:00
diagnostics.rs rustc_metadata: Make attribute decoding slightly faster and stricter 2022-01-06 12:13:41 +08:00
imports.rs Improve suggestion for extern crate self error message 2021-12-01 21:59:54 +00:00
late.rs Rollup merge of #92510 - inquisitivecrystal:foreign-block, r=cjgillot 2022-01-09 13:38:30 +01:00
lib.rs rustc_metadata: Make attribute decoding slightly faster and stricter 2022-01-06 12:13:41 +08:00
macros.rs Remove unnecessary sigils around Ident::as_str() calls. 2021-12-15 17:32:42 +11:00