Adding generic trait impl with const_evaluatable_checked bound can lead to compilation error in code using the trait. #82279
Labels
A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
A-const-generics
Area: const generics (parameters and arguments)
C-bug
Category: This is a bug.
F-const_generics
`#![feature(const_generics)]`
F-generic_const_exprs
`#![feature(generic_const_exprs)]`
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Note that the above code compiles without the function
f
, so the trait impl itself is valid. Also, obviously, it compiles withoutthe
impl
. Adding animpl
should not be a breaking change like that. While adding a blanket impl is a breaking change, AFAIR it isn’t for sealed traits; and anyways, a similar error occurs whenT
is replaced byStruct<T>
, like this.(Playground)
Errors:
@rustbot modify labels: F-const_evaluatable_checked, T-compiler, C-bug, requires-nightly, F-const_generics
The text was updated successfully, but these errors were encountered: