Skip to content

Commit cb7fb35

Browse files
committed
Revert inference failure from AsRef constification
1 parent 1d23d06 commit cb7fb35

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

library/alloc/src/borrow.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -441,11 +441,13 @@ where
441441
}
442442
}
443443

444+
// FIXME(inference): const bounds removed due to inference regressions found by crater;
445+
// see https://github.com/rust-lang/rust/issues/147964
446+
// #[rustc_const_unstable(feature = "const_convert", issue = "143773")]
444447
#[stable(feature = "rust1", since = "1.0.0")]
445-
#[rustc_const_unstable(feature = "const_convert", issue = "143773")]
446-
impl<T: ?Sized + ToOwned> const AsRef<T> for Cow<'_, T>
447-
where
448-
T::Owned: [const] Borrow<T>,
448+
impl<T: ?Sized + ToOwned> AsRef<T> for Cow<'_, T>
449+
// where
450+
// T::Owned: [const] Borrow<T>,
449451
{
450452
fn as_ref(&self) -> &T {
451453
self

0 commit comments

Comments
 (0)