Skip to content

Gate ConstParamTy_ trait behind const_param_ty_trait feature#153359

Open
zedddie wants to merge 1 commit intorust-lang:mainfrom
zedddie:const-param-ty-trait-gating
Open

Gate ConstParamTy_ trait behind const_param_ty_trait feature#153359
zedddie wants to merge 1 commit intorust-lang:mainfrom
zedddie:const-param-ty-trait-gating

Conversation

@zedddie
Copy link
Contributor

@zedddie zedddie commented Mar 3, 2026

Initially even when user wasn't using unsized const params, the only way to implement/name ConstParamTy_ was to use #![feature(unsized_const_params], now its gated under const_param_ty_trait feature, implied by unsized_const_params.

I've also changed use of unsized_const_params in tests which were using it only to implement ConstParamTy_ without using unsized

r? BoxyUwU

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

rustbot commented Mar 3, 2026

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

Copy link
Member

@BoxyUwU BoxyUwU left a comment

Choose a reason for hiding this comment

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

thanks :) updating the tests the way you did is good 👍

View changes since this review

/// Allows `for _ in _` loops in const contexts.
(unstable, const_for, "1.56.0", Some(87575)),
/// Allows naming and implementing `ConstParamTy_` directly.
(unstable, const_param_ty_trait, "CURRENT_RUSTC_VERSION", Some(95174)),
Copy link
Member

Choose a reason for hiding this comment

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

I think this should in theory be able to be a library feature instead of a language feature. I'm not sure exactly how those are added, I think you just mark an item in std as unstable and it makes one automatically 🤔

Then you dont need a new entry in this list or a new entry in symbol.rs

@zedddie zedddie force-pushed the const-param-ty-trait-gating branch from 08b857d to ba06eb8 Compare March 6, 2026 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library 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