Skip to content

Disallow non_exhaustive structs and enums with non_exhaustive variants from implementing ConstParamTy#155675

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
zedddie:disallow-non_exhaustive-adt-const-params
Apr 28, 2026
Merged

Disallow non_exhaustive structs and enums with non_exhaustive variants from implementing ConstParamTy#155675
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
zedddie:disallow-non_exhaustive-adt-const-params

Conversation

@zedddie
Copy link
Copy Markdown
Contributor

@zedddie zedddie commented Apr 23, 2026

tracking issue #154042

r? BoxyUwU

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 23, 2026
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 23, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 23, 2026

BoxyUwU is currently at their maximum review capacity.
They may take a while to respond.

@@ -0,0 +1,27 @@
//! Ensure that non exhaustive structs and enums with non exhaustive variants
//! aren't allowed to implement ConstParamTy
#![feature(min_adt_const_params)]
Copy link
Copy Markdown
Member

@BoxyUwU BoxyUwU Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you make this test revisioned on whether full adt_const_params is enabled, and if it is this test should pass ✨

View changes since the review

@zedddie zedddie force-pushed the disallow-non_exhaustive-adt-const-params branch from ceeb9ec to a12d329 Compare April 25, 2026 13:33
@zedddie zedddie force-pushed the disallow-non_exhaustive-adt-const-params branch from a12d329 to 33a1ed1 Compare April 25, 2026 13:58
//@ revisions: full min
//@[full] check-pass
#![cfg_attr(min, feature(min_adt_const_params))]
#![cfg_attr(full, feature(adt_const_params))]
Copy link
Copy Markdown
Contributor Author

@zedddie zedddie Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure now, should it go into const-generics/adt_const_params or its fine as it is in min 🧐

View changes since the review

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

min is ok :3

@BoxyUwU
Copy link
Copy Markdown
Member

BoxyUwU commented Apr 27, 2026

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 27, 2026

📌 Commit 33a1ed1 has been approved by BoxyUwU

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 27, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 27, 2026
…t-const-params, r=BoxyUwU

Disallow non_exhaustive structs and enums with non_exhaustive variants from implementing `ConstParamTy`

tracking issue rust-lang#154042

r? BoxyUwU
rust-bors Bot pushed a commit that referenced this pull request Apr 27, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #155760 (Remove `AttributeLintKind`)
 - #154510 (Partially stabilize LoongArch target features)
 - #155137 (Allow trailing `self` in more contexts)
 - #155433 (Rip out rustc_layout_scalar_valid_range_* attribute support)
 - #155702 (Change `ItemKind::Trait` to a field variant.)
 - #154896 (Fix ICE: Scalar layout for non-primitive non-enum type unsafe binder)
 - #155675 (Disallow non_exhaustive structs and enums with non_exhaustive variants from implementing `ConstParamTy`)
 - #155874 (Avoid misleading closure return type note)
 - #155876 (CI: rfl: move job forward to Linux v7.1-rc1)
rust-bors Bot pushed a commit that referenced this pull request Apr 27, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #154510 (Partially stabilize LoongArch target features)
 - #155137 (Allow trailing `self` in more contexts)
 - #155513 (rustc_public: implement `Pattern` type)
 - #155702 (Change `ItemKind::Trait` to a field variant.)
 - #154896 (Fix ICE: Scalar layout for non-primitive non-enum type unsafe binder)
 - #155675 (Disallow non_exhaustive structs and enums with non_exhaustive variants from implementing `ConstParamTy`)
 - #155874 (Avoid misleading closure return type note)
 - #155876 (CI: rfl: move job forward to Linux v7.1-rc1)
@rust-bors rust-bors Bot merged commit 76a502d into rust-lang:main Apr 28, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants