Specialization does not work correctly during constant evaluation. #66901
Labels
A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
A-specialization
Area: Trait impl specialization
C-bug
Category: This is a bug.
F-specialization
`#![feature(specialization)]`
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.
A crate using specialization I've been working on seems to have broken sometime between
nightly-2019-11-19
andnightly-2019-11-20
. After a bit of debugging, it seems the issue is that specialization doesn't always work correctly in const contexts.This code, for example, returns the following:
On earlier versions, this would have returned the following:
This bug does not happen when the
-Z mir-opt-level=0
flag is set, and it behaves the same as prior versions.The text was updated successfully, but these errors were encountered: