Repository navigation
Output type refactors & change analysis query into required_analysis - #166270
Conversation
|
cc @rust-lang/clippy
cc @bjorn3 The rustc-dev-guide subtree was changed. If your future PRs only touch the subtree, consider submitting them directly to rust-lang/rustc-dev-guide, which is where the document is primarily maintained (and has faster CI).
cc @rust-lang/miri
cc @Muscraft |
479f4ff to
e46b12a
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
e46b12a to
85a3b49
Compare
This comment has been minimized.
This comment has been minimized.
85a3b49 to
494a742
Compare
|
cc @rust-lang/rustfmt |
|
From the PR description:
You mean convert |
|
r=me with the above fixes |
494a742 to
a547746
Compare
Rollup of 4 pull requests Successful merges: - #166270 (Output type refactors & change analysis query into required_analysis) - #165302 (Introduce `rustc-unicode` crate for centralising Unicode version management) - #166249 (Tidy-sort and use more of `GeneratedAttr`) - #166370 (Disallow duplicates of `rustc_const_stable_indirect` and `allow_internal_unsafe` attributes)
Rollup merge of #166270 - blyxyas:output-type-refactors, r=bjorn3 Output type refactors & change analysis query into required_analysis Split from #163670 We split OutputType from `config.rs` to `output.rs`, and because we only use full_analysis a single time in each compilation (at least currently), convert it to a regular function, and have `required_analysis` be the query. r? @bjorn3
Rollup of 4 pull requests Successful merges: - rust-lang/rust#166270 (Output type refactors & change analysis query into required_analysis) - rust-lang/rust#165302 (Introduce `rustc-unicode` crate for centralising Unicode version management) - rust-lang/rust#166249 (Tidy-sort and use more of `GeneratedAttr`) - rust-lang/rust#166370 (Disallow duplicates of `rustc_const_stable_indirect` and `allow_internal_unsafe` attributes)
Rollup of 4 pull requests Successful merges: - rust-lang/rust#166270 (Output type refactors & change analysis query into required_analysis) - rust-lang/rust#165302 (Introduce `rustc-unicode` crate for centralising Unicode version management) - rust-lang/rust#166249 (Tidy-sort and use more of `GeneratedAttr`) - rust-lang/rust#166370 (Disallow duplicates of `rustc_const_stable_indirect` and `allow_internal_unsafe` attributes)
Rollup of 4 pull requests Successful merges: - rust-lang/rust#166270 (Output type refactors & change analysis query into required_analysis) - rust-lang/rust#165302 (Introduce `rustc-unicode` crate for centralising Unicode version management) - rust-lang/rust#166249 (Tidy-sort and use more of `GeneratedAttr`) - rust-lang/rust#166370 (Disallow duplicates of `rustc_const_stable_indirect` and `allow_internal_unsafe` attributes)
Upstream rust-lang/rust#166270 (included in nightly-2026-11-24, commit-date 2026-11-23) moved `ErrorOutputType`, `OutputType`, and `OutputTypes` from `rustc_session::config` to `rustc_session::output` and replaced `tcx.ensure_ok().analysis(())` with `rustc_interface::passes::full_analysis(tcx)`. In the same nightly, upstream rust-lang/rust#165481 introduced `rustc_abi::Primitive::Bool` for two-variant enums without an explicit integer repr, causing `DiscriminantTy::of_tag` to reject those enums. Gate the `rustc_session::output` imports and `full_analysis` call on `#[rustversion::before(2026-11-23)]` / `#[rustversion::since(2026-11-23)]`, handle `tag.is_bool()` as unsigned 8-bit in `DiscriminantTy::of_tag` (matching rustc's `Primitive::to_int_ty` across all toolchains without version gating), and record the Rust 1.101 branch date (2026-11-06) in `rustversion_impl.rs` so `since(2026-11-23)` maps to 1.102 instead of 1.101. Fixes #3129 PiperOrigin-RevId: 1029148481
Split from #163670
We split OutputType from
config.rstooutput.rs, and because we only use full_analysis a single time in each compilation (at least currently), convert it to a regular function, and haverequired_analysisbe the query.r? @bjorn3