Repository navigation
Simplify the G in Diag<'a, G> - #162630
Conversation
|
HIR ty lowering was modified cc @fmease The parser was modified, potentially altering the grammar of (stable) Rust cc @fmease Some changes occurred in compiler/rustc_attr_parsing cc @jdonszelmann, @JonathanBrouwer 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). Some changes occurred in match checking cc @Nadrieril Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt
cc @rust-lang/clippy
cc @rust-lang/miri Some changes occurred to constck cc @fee1-dead Some changes occurred to the CTFE machinery Some changes occurred in cc @BoxyUwU |
|
The first two commits here are definite wins. I'm more ambivalent about the third commit: it makes some things better and some things worse and I'm not sure if it's a good idea overall. |
There was a problem hiding this comment.
I was initially a bit sceptical about the third commit, but overall I think it's an improvement. The idea of carrying the emission guarantee as a generic param is nice, but ended up not that useful in practice
@bors r+
|
@bors r- I raced my review with other reviews by not checking that something changed oops |
|
This pull request was unapproved. |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Simplify the `G` in `Diag<'a, G>`
…-obk Simplify the `G` in `Diag<'a, G>` The `EmissionGuarantee` trait isn't necessary, and just complicates things. Details in individual commits. r? @oli-obk
…uwer Rollup of 11 pull requests Successful merges: - #162752 (`rust-analyzer` subtree update) - #161868 (libtest: never iterate over all tests in `--exact` mode) - #161903 (Fix initialization cycle in `target_config`) - #162240 (Garbage-collect old incremental compilation sessions) - #161675 (document that t-lang does not need involvement for unobservable intrisics) - #162630 (Simplify the `G` in `Diag<'a, G>`) - #162647 (Add regression test for previous overflow evaluating the requirement) - #162703 (regression test for valtree leaf const) - #162723 (Add regression test for unexpected type for constructor) - #162735 (Remove pointless `A: Allocator` bounds in boxed.rs) - #162736 (clean up trivial region constraint filtering)
…-obk Simplify the `G` in `Diag<'a, G>` The `EmissionGuarantee` trait isn't necessary, and just complicates things. Details in individual commits. r? @oli-obk
…uwer Rollup of 15 pull requests Successful merges: - #162752 (`rust-analyzer` subtree update) - #161903 (Fix initialization cycle in `target_config`) - #162240 (Garbage-collect old incremental compilation sessions) - #162610 (fix tailcall indirect return) - #162634 (Implement semantic analysis for named `Fn` trait params) - #161675 (document that t-lang does not need involvement for unobservable intrisics) - #162160 (turn aligned-in-packed error into lint) - #162504 (Stabilize `unsafe_cell_access`) - #162516 (tidy: Sort multi-line types by treating `>` as a closing bracket) - #162630 (Simplify the `G` in `Diag<'a, G>`) - #162647 (Add regression test for previous overflow evaluating the requirement) - #162703 (regression test for valtree leaf const) - #162723 (Add regression test for unexpected type for constructor) - #162735 (Remove pointless `A: Allocator` bounds in boxed.rs) - #162736 (clean up trivial region constraint filtering)
…uwer Rollup of 16 pull requests Successful merges: - #162762 (Subtree sync for rustc_codegen_cranelift) - #162752 (`rust-analyzer` subtree update) - #161903 (Fix initialization cycle in `target_config`) - #162240 (Garbage-collect old incremental compilation sessions) - #162610 (fix tailcall indirect return) - #162634 (Implement semantic analysis for named `Fn` trait params) - #161675 (document that t-lang does not need involvement for unobservable intrisics) - #162160 (turn aligned-in-packed error into lint) - #162504 (Stabilize `unsafe_cell_access`) - #162516 (tidy: Sort multi-line types by treating `>` as a closing bracket) - #162630 (Simplify the `G` in `Diag<'a, G>`) - #162647 (Add regression test for previous overflow evaluating the requirement) - #162703 (regression test for valtree leaf const) - #162723 (Add regression test for unexpected type for constructor) - #162735 (Remove pointless `A: Allocator` bounds in boxed.rs) - #162736 (clean up trivial region constraint filtering)
…-obk Simplify the `G` in `Diag<'a, G>` The `EmissionGuarantee` trait isn't necessary, and just complicates things. Details in individual commits. r? @oli-obk
…uwer Rollup of 16 pull requests Successful merges: - rust-lang/rust#162762 (Subtree sync for rustc_codegen_cranelift) - rust-lang/rust#162752 (`rust-analyzer` subtree update) - rust-lang/rust#161903 (Fix initialization cycle in `target_config`) - rust-lang/rust#162240 (Garbage-collect old incremental compilation sessions) - rust-lang/rust#162610 (fix tailcall indirect return) - rust-lang/rust#162634 (Implement semantic analysis for named `Fn` trait params) - rust-lang/rust#161675 (document that t-lang does not need involvement for unobservable intrisics) - rust-lang/rust#162160 (turn aligned-in-packed error into lint) - rust-lang/rust#162504 (Stabilize `unsafe_cell_access`) - rust-lang/rust#162516 (tidy: Sort multi-line types by treating `>` as a closing bracket) - rust-lang/rust#162630 (Simplify the `G` in `Diag<'a, G>`) - rust-lang/rust#162647 (Add regression test for previous overflow evaluating the requirement) - rust-lang/rust#162703 (regression test for valtree leaf const) - rust-lang/rust#162723 (Add regression test for unexpected type for constructor) - rust-lang/rust#162735 (Remove pointless `A: Allocator` bounds in boxed.rs) - rust-lang/rust#162736 (clean up trivial region constraint filtering)
…uwer Rollup of 16 pull requests Successful merges: - rust-lang/rust#162762 (Subtree sync for rustc_codegen_cranelift) - rust-lang/rust#162752 (`rust-analyzer` subtree update) - rust-lang/rust#161903 (Fix initialization cycle in `target_config`) - rust-lang/rust#162240 (Garbage-collect old incremental compilation sessions) - rust-lang/rust#162610 (fix tailcall indirect return) - rust-lang/rust#162634 (Implement semantic analysis for named `Fn` trait params) - rust-lang/rust#161675 (document that t-lang does not need involvement for unobservable intrisics) - rust-lang/rust#162160 (turn aligned-in-packed error into lint) - rust-lang/rust#162504 (Stabilize `unsafe_cell_access`) - rust-lang/rust#162516 (tidy: Sort multi-line types by treating `>` as a closing bracket) - rust-lang/rust#162630 (Simplify the `G` in `Diag<'a, G>`) - rust-lang/rust#162647 (Add regression test for previous overflow evaluating the requirement) - rust-lang/rust#162703 (regression test for valtree leaf const) - rust-lang/rust#162723 (Add regression test for unexpected type for constructor) - rust-lang/rust#162735 (Remove pointless `A: Allocator` bounds in boxed.rs) - rust-lang/rust#162736 (clean up trivial region constraint filtering)
…uwer Rollup of 16 pull requests Successful merges: - rust-lang/rust#162762 (Subtree sync for rustc_codegen_cranelift) - rust-lang/rust#162752 (`rust-analyzer` subtree update) - rust-lang/rust#161903 (Fix initialization cycle in `target_config`) - rust-lang/rust#162240 (Garbage-collect old incremental compilation sessions) - rust-lang/rust#162610 (fix tailcall indirect return) - rust-lang/rust#162634 (Implement semantic analysis for named `Fn` trait params) - rust-lang/rust#161675 (document that t-lang does not need involvement for unobservable intrisics) - rust-lang/rust#162160 (turn aligned-in-packed error into lint) - rust-lang/rust#162504 (Stabilize `unsafe_cell_access`) - rust-lang/rust#162516 (tidy: Sort multi-line types by treating `>` as a closing bracket) - rust-lang/rust#162630 (Simplify the `G` in `Diag<'a, G>`) - rust-lang/rust#162647 (Add regression test for previous overflow evaluating the requirement) - rust-lang/rust#162703 (regression test for valtree leaf const) - rust-lang/rust#162723 (Add regression test for unexpected type for constructor) - rust-lang/rust#162735 (Remove pointless `A: Allocator` bounds in boxed.rs) - rust-lang/rust#162736 (clean up trivial region constraint filtering)
Remove `G` generic param from `Diag<'_, G>` The benefits are outweighed by the costs. Details in invidual commits. some minor earlier discussion about this change in rust-lang#162630 (comment)
Remove `G` generic param from `Diag<'_, G>` The benefits are outweighed by the costs. Details in invidual commits. some minor earlier discussion about this change in #162630 (comment)
Remove `G` generic param from `Diag<'_, G>` The benefits are outweighed by the costs. Details in invidual commits. some minor earlier discussion about this change in rust-lang#162630 (comment)
Remove `G` generic param from `Diag<'_, G>` The benefits are outweighed by the costs. Details in invidual commits. some minor earlier discussion about this change in #162630 (comment)
Rollup merge of #163083 - nnethercote:rm-Diag-G, r=oli-obk Remove `G` generic param from `Diag<'_, G>` The benefits are outweighed by the costs. Details in invidual commits. some minor earlier discussion about this change in #162630 (comment)
Remove `G` generic param from `Diag<'_, G>` The benefits are outweighed by the costs. Details in invidual commits. some minor earlier discussion about this change in rust-lang/rust#162630 (comment)
Remove `G` generic param from `Diag<'_, G>` The benefits are outweighed by the costs. Details in invidual commits. some minor earlier discussion about this change in rust-lang/rust#162630 (comment)
…e list (#10) nightly-2026-09-27 does not compile this library. Two upstream changes: 1. rust-lang/rust#162630 (merged 2026-09-14) deleted `rustc_errors::EmissionGuarantee`; `Diagnostic<'a>` and `Diag<'a>` lost the `G` parameter. `RustLintsPolicyDiag` now implements the plain trait. 2. HIR no longer splits `use a::{b, c::*}` into one item per element. It is one `ItemKind::Use(UseTree)` with `UseKind::Nested { items }`. The old `matches!(item.kind, ItemKind::Use(_, UseKind::Glob))` stopped compiling, and a plain port to the new shape would only catch top-level globs. `check_wildcard_import` now recurses and reports each glob at its own path span. Also: `nix flake update rust-overlay nixpkgs` so the rolling default resolves the new nightly, and `supplied-toolchain-identity` moves from 2026-08-26 (no longer compiles) to 2026-09-26: new enough for the new API, and still different from the rolling default, which is what that check is asserting. Needed by techzenlabs/benefits-platform's move to nightly-2026-09-27. ## How verified | Command | Result | |---|---| | `nix flake check` | all 24 checks passed | | `nix develop -c cargo test --release` | 23 passed | | `nix develop -c scripts/check-blocking-in-async-fixture.sh` | OK: 11 expected sites, no others | | fixture `cargo dylint --all -- --workspace` (README command) | 2 wildcard warnings: `product-core/src/lib.rs:7:1` (`use sqlx::*`) and the new `lib.rs:24:21` (`deep::*` inside `use nested::{Named, deep::*}`) | | `cargo fmt --check` | clean | GATE_AT_COMMIT=2ec820e5e23465de0216b1e9561ed561f5c07686
Remove `G` generic param from `Diag<'_, G>` The benefits are outweighed by the costs. Details in invidual commits. some minor earlier discussion about this change in rust-lang#162630 (comment)
View all comments
The
EmissionGuaranteetrait isn't necessary, and just complicates things. Details in individual commits.r? @oli-obk