Skip to content

Commit 6ae63b7

Browse files
authored
Unrolled build for #148011
Rollup merge of #148011 - clarfonthey:const-convert-revert, r=oli-obk Revert constification of `AsRef for Cow` due to inference failure Reported issue: #147964 Original PR: #145279 `const AsRef` tracking issue: #143773 Should have additional crater run to verify this fixes the issue.
2 parents 4b3ba58 + cb7fb35 commit 6ae63b7

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)