Skip to content

Commit a49123f

Browse files
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`.
2 parents cf66afd + e59b1dd commit a49123f

0 file changed

File tree

    0 commit comments

    Comments
     (0)