Revert inference failure from AsRef constification

(cherry picked from commit cb7fb35ad1)
This commit is contained in:
ltdk 2025-10-22 20:27:46 -04:00 committed by Josh Stone
parent 1f25197887
commit b6d30faa79

View file

@ -441,11 +441,13 @@ where
}
}
// FIXME(inference): const bounds removed due to inference regressions found by crater;
// see https://github.com/rust-lang/rust/issues/147964
// #[rustc_const_unstable(feature = "const_convert", issue = "143773")]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_convert", issue = "143773")]
impl<T: ?Sized + ToOwned> const AsRef<T> for Cow<'_, T>
where
T::Owned: [const] Borrow<T>,
impl<T: ?Sized + ToOwned> AsRef<T> for Cow<'_, T>
// where
// T::Owned: [const] Borrow<T>,
{
fn as_ref(&self) -> &T {
self