1
Fork 0

Auto merge of #110393 - fee1-dead-contrib:rm-const-traits, r=oli-obk

Rm const traits in libcore

See [zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/.60const.20Trait.60.20removal.20or.20rework)

* [x] Bless ui tests
* [ ] Re constify some unstable functions with workarounds if they are needed
This commit is contained in:
bors 2023-04-19 13:03:40 +00:00
commit 3a5c8e91f0
180 changed files with 1462 additions and 1955 deletions

View file

@ -1650,11 +1650,10 @@ impl<T> *const [T] {
/// }
/// ```
#[unstable(feature = "slice_ptr_get", issue = "74265")]
#[rustc_const_unstable(feature = "const_slice_index", issue = "none")]
#[inline]
pub const unsafe fn get_unchecked<I>(self, index: I) -> *const I::Output
pub unsafe fn get_unchecked<I>(self, index: I) -> *const I::Output
where
I: ~const SliceIndex<[T]>,
I: SliceIndex<[T]>,
{
// SAFETY: the caller ensures that `self` is dereferenceable and `index` in-bounds.
unsafe { index.get_unchecked(self) }