From cb7fb35ad1b567f02d8f2226df173736fba86850 Mon Sep 17 00:00:00 2001 From: ltdk Date: Wed, 22 Oct 2025 20:27:46 -0400 Subject: [PATCH] Revert inference failure from AsRef constification --- library/alloc/src/borrow.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/library/alloc/src/borrow.rs b/library/alloc/src/borrow.rs index cb32896161e5c..4659fb2a8426d 100644 --- a/library/alloc/src/borrow.rs +++ b/library/alloc/src/borrow.rs @@ -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 const AsRef for Cow<'_, T> -where - T::Owned: [const] Borrow, +impl AsRef for Cow<'_, T> +// where +// T::Owned: [const] Borrow, { fn as_ref(&self) -> &T { self