Commit a49123f
authored
Rollup merge of #153959 - mu001999-contrib:fix-153848, r=petrochenkov
Fix non-module `parent_module` in stripped cfg diagnostics
Fixes rust-lang/rust#153848
Old `parent_module` is from the `parent_node` in `append_stripped_cfg_item`, it cannot be assumed that it points to a real module. So call `expect_module` on it will cause ICE.
The first commit rename `parent_module` to `parent_scope`, and the second using `get_nearest_non_block_module` to find the nearest `module` of `parent_scope` in `find_cfg_stripped`, which should be the correct `parent_module`.0 file changed
0 commit comments