Cow<'a, T> isn't specializable while FooCow<'a, T> is #106710
Labels
A-specialization
Area: Trait impl specialization
C-bug
Category: This is a bug.
F-specialization
`#![feature(specialization)]`
requires-incomplete-features
This issue requires the use of incomplete features.
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=60bb0c925354009304afd4b84aa2e8e6
I tried this code:
I expected to see this happen:
no compilation error and the output should be like this:
Instead, this happened:
Oddly enough, I found that you can specialize
Cow
if it's further bound with+ Clone
. (try to comment in), after fiddling with the code a bit.Also, another specialization for identical type shape is allowed if it's user defined. so, i guess
Cow
is specially treated internally?Meta
originally found and reduced to a minimal test case above: solana-labs/solana#29596
The text was updated successfully, but these errors were encountered: