rust/compiler/rustc_resolve
Jacob Pratt 25b81bf5ad
Rollup merge of #145590 - nnethercote:ModKind-Inline, r=petrochenkov
Prevent impossible combinations in `ast::ModKind`.

`ModKind::Loaded` has an `inline` field and a `had_parse_error` field. If the `inline` field is `Inline::Yes` then `had_parse_error` must be `Ok(())`.

This commit moves the `had_parse_error` field into the `Inline::No` variant. This makes it impossible to create the nonsensical combination of `inline == Inline::Yes` and `had_parse_error = Err(_)`.

r? ```@Urgau```
2025-08-21 01:12:19 -04:00
..
src Rollup merge of #145590 - nnethercote:ModKind-Inline, r=petrochenkov 2025-08-21 01:12:19 -04:00
Cargo.toml Rollup merge of #144746 - petrochenkov:extpreltidy, r=b-naber 2025-08-04 11:24:39 +10:00
messages.ftl Rollup merge of #145166 - makai410:teach-pub-crate, r=lcnr 2025-08-19 19:42:08 +08:00