constify Cow::Owned types by npmccallum · Pull Request #146532 · rust-lang/rust (original) (raw)

Cow already has a Deref<Target=B> implementation that is const when the Borrow impl from the owned type is also const. However, none of the major types actually implement this, so the Deref impl doesn't really work.

This change constifies the two major Cow::Owned types so that the Deref impl on Cow will work for those two types.