Rollup of 9 pull requests#155309
Closed
JonathanBrouwer wants to merge 21 commits intorust-lang:mainfrom
Closed
Conversation
This especially means that for c: char, c.is_ascii() && c.is_whitespace() does **not** imply c.is_ascii_whitespace().
…min_adt_const_params`
* Fix ICE when Self is used in enum discriminant of a generic enum Move the validation into the existing `check_param_uses_if_mcg` machinery in HIR ty lowering instead of adding a new check in wfcheck. After the `AnonConstKind` refactoring, `ForbidMCGParamUsesFolder` was only gated on `AnonConstKind::MCG`, causing discriminant anon consts (`NonTypeSystem`) to bypass it entirely. Add `anon_const_forbids_generic_params()` which returns the appropriate `ForbidParamContext` for both MCG and enum discriminant contexts. Wire it into `check_param_uses_if_mcg` so that `Self` aliasing a generic type is caught before reaching `const_eval_poly`. Convert the `TooGeneric` span_bug into a proper diagnostic as a fallback for anything slipping through type-dependent path resolution. * Address review comments - Rename `ForbidMCGParamUsesFolder` to `ForbidParamUsesFolder` - Rename `MinConstGenerics` variant to `ConstArgument` with updated doc - Simplify doc comment on `anon_const_forbids_generic_params` - Make match on `AnonConstKind` exhaustive - Move `anon_const_def_id` inside the `if let` in `check_param_uses_if_mcg` - Remove now-unreachable `TooGeneric` span_err in wfcheck * Revert TooGeneric arm back to span_bug! as requested by reviewer * Use generics_of to determine if NonTypeSystem anon consts allow generic params * Also check InlineConst and Closure defs nested in enum discriminants * Simplify logic for determining anonymous constant parent in generic contexts * add test
…ate, r=BoxyUwU Add `const_param_ty_unchecked` gate Add `const_param_ty_unchecked` internal feature gate to skip `ConstParamTy_` trait enforcement on type. Provides an escape hatch for writing tests and examples that use const generics without needing to ensure all fields implement `ConstParamTy_`. r? BoxyUwU
…eric-self, r=BoxyUwU Fix ICE when Self is used in enum discriminant of a generic enum Fixes rust-lang#153756 Let discriminant AnonConst inherit parent generics via Node::Variant in generics_of, and emit a proper error instead of span_bug! for the TooGeneric case in wfcheck.
…=BoxyUwU Gate tuple const params behind `min_adt_const_params` feature r? BoxyUwU
…umeGomez fix arch names in cfg pretty printer It's introduced in rust-lang#154328. @rustbot label +beta-nominated (it affects the documentation of [`core::arch::loongarch32`](https://doc.rust-lang.org/beta/core/arch/loongarch32/index.html) and [`core::arch::loongarch64`](https://doc.rust-lang.org/beta/core/arch/loongarch64/index.html))
…-Simulacrum,WaffleLapkin Clarify ascii whitespace exclusion of vertical tab in the doc This especially means that for `c: char`, `c.is_ascii() && c.is_whitespace()` does **not** imply `c.is_ascii_whitespace()`, which can cause bug and is highly counterintuitive.
…nup, r=lcnr Some small nits for supertrait_item_shadowing, and additional testing cc rust-lang#89151 r? types
…rn-white-space, r=jdonszelmann Test/lexer unicode pattern white space This PR adds a test for the Rust lexer to verify it correctly accepts vertical tab (`\x0B`) as valid whitespace between tokens. Vertical tab is part of Unicode Pattern_White_Space, which the Rust language specification uses to define whitespace. Related: Outreachy tracking [Pattern_White_Space](https://www.unicode.org/reports/tr31/#R3a)
…athanBrouwer Tests for precise-capture through RPIT and TAIT - Tests for rust-lang#155151. These tests succeed under `-Znext-solver`, but incorrectly fail under the old trait solver. --- The bug can be triggered via return-position `impl Trait` on stable, but requires some rather contrived code. When using type-alias `impl Trait`, it's easier to imagine the issue being triggered by real code.
…onathanBrouwer remove PointeeParser this parser does nothing currently, as the current scope of `rustc_attr_parsing` only includes builtin attributes, and not derive macros it isn't defined in `compiler/rustc_feature/src/builtin_attrs.rs` all the actual parsing for `#[pointee]` is actually handled in `compiler/rustc_builtin_macros/src/deriving/coerce_pointee.rs` r? @JonathanBrouwer
Contributor
Author
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors bot
pushed a commit
that referenced
this pull request
Apr 14, 2026
Rollup of 9 pull requests try-job: dist-various-1 try-job: test-various try-job: x86_64-gnu-aux try-job: x86_64-gnu-llvm-21-3 try-job: x86_64-msvc-1 try-job: aarch64-apple try-job: x86_64-mingw-1 try-job: i686-msvc-2
This comment has been minimized.
This comment has been minimized.
rust-bors bot
pushed a commit
that referenced
this pull request
Apr 14, 2026
…uwer Rollup of 9 pull requests Successful merges: - #153536 (Add `const_param_ty_unchecked` gate) - #153815 (Fix ICE when Self is used in enum discriminant of a generic enum) - #154882 (Gate tuple const params behind `min_adt_const_params` feature) - #155293 (fix arch names in cfg pretty printer) - #154765 (Clarify ascii whitespace exclusion of vertical tab in the doc) - #155172 (Some small nits for supertrait_item_shadowing, and additional testing) - #155279 (Test/lexer unicode pattern white space) - #155280 (Tests for precise-capture through RPIT and TAIT) - #155304 (remove PointeeParser)
Contributor
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for 9c8ebe4 failed: CI. Failed job:
|
Contributor
|
PR #153536, which is a member of this rollup, was unapproved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
const_param_ty_uncheckedgate #153536 (Addconst_param_ty_uncheckedgate)min_adt_const_paramsfeature #154882 (Gate tuple const params behindmin_adt_const_paramsfeature)r? @ghost
Create a similar rollup