-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Open
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)F-adt_const_params`#![feature(adt_const_params)]``#![feature(adt_const_params)]`F-unsized_const_params`#![feature(unsized_const_params)]``#![feature(unsized_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
Hello, when i try
#![feature(unsized_const_params)]
use std::marker::ConstParamTy_;
use std::marker::UnsizedConstParamTy;
#[derive(PartialEq, Eq)]
pub struct MyStruct;
impl UnsizedConstParamTy for MyStruct {}
impl ConstParamTy_ for MyStruct {}
// Allowed
pub struct Test<const PARAM: MyStruct> {}It works, You should allow only allow ConstParamTy and UnsizedConstParamTy derive macro in nightly and not expose the internal trait to user code.
Metadata
Metadata
Assignees
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)F-adt_const_params`#![feature(adt_const_params)]``#![feature(adt_const_params)]`F-unsized_const_params`#![feature(unsized_const_params)]``#![feature(unsized_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.