Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adt_const_params does not explicitly check for a union ConstParamTy impl #112125

Closed
BoxyUwU opened this issue May 31, 2023 · 0 comments · Fixed by #127722
Closed

adt_const_params does not explicitly check for a union ConstParamTy impl #112125

BoxyUwU opened this issue May 31, 2023 · 0 comments · Fixed by #127722
Labels
A-const-generics Area: const generics (parameters and arguments) C-bug Category: This is a bug. F-adt_const_params `#![feature(adt_const_params)]` T-types Relevant to the types team, which will review and decide on the PR/issue.

Comments

@BoxyUwU
Copy link
Member

BoxyUwU commented May 31, 2023

I am not sure there is actually a piece of code that is incorrectly compiled since you cannot manually impl StructuralEq and StructuralPartialEq and you also cant derive(Eq, PartialEq) on a union. regardless there is currently no check that a manual impl ConstParamTy for MyType { is not applied to a union. There should be one to ensure that we do not accidentally allow usage of unions in const param tys.

Meta

rustc --version --verbose:

Nightly channel

Build using the Nightly version: 1.72.0-nightly

(2023-05-29 498553fc04f6a3fdc534)
Backtrace

<backtrace>

@BoxyUwU BoxyUwU added C-bug Category: This is a bug. A-const-generics Area: const generics (parameters and arguments) F-adt_const_params `#![feature(adt_const_params)]` T-types Relevant to the types team, which will review and decide on the PR/issue. labels May 31, 2023
@BoxyUwU BoxyUwU self-assigned this May 31, 2023
@BoxyUwU BoxyUwU removed their assignment Jul 3, 2023
@bors bors closed this as completed in 9629b90 Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-generics Area: const generics (parameters and arguments) C-bug Category: This is a bug. F-adt_const_params `#![feature(adt_const_params)]` T-types Relevant to the types team, which will review and decide on the PR/issue.
Projects
None yet
1 participant