-
-
Notifications
You must be signed in to change notification settings - Fork 17.6k
adt_const_params does not explicitly check for a union ConstParamTy impl #112125
Copy link
Copy link
Closed
Closed
Copy link
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)C-bugCategory: This is a bug.Category: This is a bug.F-adt_const_params`#![feature(adt_const_params)]``#![feature(adt_const_params)]`T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Description
Activity
Metadata
Metadata
Assignees
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)C-bugCategory: This is a bug.Category: This is a bug.F-adt_const_params`#![feature(adt_const_params)]``#![feature(adt_const_params)]`T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
I am not sure there is actually a piece of code that is incorrectly compiled since you cannot manually impl
StructuralEqandStructuralPartialEqand you also cantderive(Eq, PartialEq)on a union. regardless there is currently no check that a manualimpl 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:Backtrace