const_refs_to_cell: dont let mutable references sneak past the interi… · qinheping/verify-rust-std@29c8eef (original) (raw)

Original file line number Diff line number Diff line change
@@ -846,7 +846,7 @@ impl [T] {
846 846 /// [`as_mut_ptr`]: slice::as_mut_ptr
847 847 #[stable(feature = "slice_ptr_range", since = "1.48.0")]
848 848 #[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
849 -#[rustc_allow_const_fn_unstable(const_mut_refs)]
849 +#[rustc_allow_const_fn_unstable(const_mut_refs, const_refs_to_cell)]
850 850 #[inline]
851 851 #[must_use]
852 852 pub const fn as_mut_ptr_range(&mut self) -> Range<*mut T> {