Auto merge of #97600 - matthiaskrgr:rollup-yivyeu5, r=matthiaskrgr
Rollup of 4 pull requests Successful merges: - #97316 (Put a bound on collection misbehavior) - #97578 (alloc: remove repeated word in comment) - #97593 (⬆️ rust-analyzer) - #97596 (Fixup feature name to be more consistent with others) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
6f481f8b71
@ -166,9 +166,10 @@
|
||||
/// item's ordering relative to any other item, as determined by the [`Ord`]
|
||||
/// trait, changes while it is in the heap. This is normally only possible
|
||||
/// through [`Cell`], [`RefCell`], global state, I/O, or unsafe code. The
|
||||
/// behavior resulting from such a logic error is not specified (it
|
||||
/// could include panics, incorrect results, aborts, memory leaks, or
|
||||
/// non-termination) but will not be undefined behavior.
|
||||
/// behavior resulting from such a logic error is not specified, but will
|
||||
/// be encapsulated to the `BinaryHeap` that observed the logic error and not
|
||||
/// result in undefined behavior. This could include panics, incorrect results,
|
||||
/// aborts, memory leaks, and non-termination.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -64,9 +64,9 @@
|
||||
/// It is a logic error for a key to be modified in such a way that the key's ordering relative to
|
||||
/// any other key, as determined by the [`Ord`] trait, changes while it is in the map. This is
|
||||
/// normally only possible through [`Cell`], [`RefCell`], global state, I/O, or unsafe code.
|
||||
/// The behavior resulting from such a logic error is not specified (it could include panics,
|
||||
/// incorrect results, aborts, memory leaks, or non-termination) but will not be undefined
|
||||
/// behavior.
|
||||
/// The behavior resulting from such a logic error is not specified, but will be encapsulated to the
|
||||
/// `BTreeMap` that observed the logic error and not result in undefined behavior. This could
|
||||
/// include panics, incorrect results, aborts, memory leaks, and non-termination.
|
||||
///
|
||||
/// Iterators obtained from functions such as [`BTreeMap::iter`], [`BTreeMap::values`], or
|
||||
/// [`BTreeMap::keys`] produce their items in order by key, and take worst-case logarithmic and
|
||||
|
@ -23,9 +23,9 @@
|
||||
/// It is a logic error for an item to be modified in such a way that the item's ordering relative
|
||||
/// to any other item, as determined by the [`Ord`] trait, changes while it is in the set. This is
|
||||
/// normally only possible through [`Cell`], [`RefCell`], global state, I/O, or unsafe code.
|
||||
/// The behavior resulting from such a logic error is not specified (it could include panics,
|
||||
/// incorrect results, aborts, memory leaks, or non-termination) but will not be undefined
|
||||
/// behavior.
|
||||
/// The behavior resulting from such a logic error is not specified, but will be encapsulated to the
|
||||
/// `BTreeSet` that observed the logic error and not result in undefined behavior. This could
|
||||
/// include panics, incorrect results, aborts, memory leaks, and non-termination.
|
||||
///
|
||||
/// Iterators returned by [`BTreeSet::iter`] produce their items in order, and take worst-case
|
||||
/// logarithmic and amortized constant time per item returned.
|
||||
|
@ -2472,7 +2472,7 @@ unsafe fn spec_extend_from_within(&mut self, src: Range<usize>) {
|
||||
// SAFETY:
|
||||
// - Both pointers are created from unique slice references (`&mut [_]`)
|
||||
// so they are valid and do not overlap.
|
||||
// - Elements are :Copy so it's OK to to copy them, without doing
|
||||
// - Elements are :Copy so it's OK to copy them, without doing
|
||||
// anything with the original values
|
||||
// - `count` is equal to the len of `source`, so source is valid for
|
||||
// `count` reads
|
||||
|
@ -264,7 +264,7 @@ pub const fn from_mut<T>(s: &mut T) -> &mut [T] {
|
||||
///
|
||||
/// [valid]: ptr#safety
|
||||
#[unstable(feature = "slice_from_ptr_range", issue = "89792")]
|
||||
#[rustc_const_unstable(feature = "slice_from_mut_ptr_range_const", issue = "89792")]
|
||||
#[rustc_const_unstable(feature = "const_slice_from_mut_ptr_range", issue = "89792")]
|
||||
pub const unsafe fn from_mut_ptr_range<'a, T>(range: Range<*mut T>) -> &'a mut [T] {
|
||||
// SAFETY: the caller must uphold the safety contract for `from_mut_ptr_range`.
|
||||
unsafe { from_raw_parts_mut(range.start, range.end.sub_ptr(range.start)) }
|
||||
|
@ -54,7 +54,8 @@
|
||||
/// the [`Eq`] trait, changes while it is in the map. This is normally only
|
||||
/// possible through [`Cell`], [`RefCell`], global state, I/O, or unsafe code.
|
||||
/// The behavior resulting from such a logic error is not specified, but will
|
||||
/// not result in undefined behavior. This could include panics, incorrect results,
|
||||
/// be encapsulated to the `HashMap` that observed the logic error and not
|
||||
/// result in undefined behavior. This could include panics, incorrect results,
|
||||
/// aborts, memory leaks, and non-termination.
|
||||
///
|
||||
/// The hash table implementation is a Rust port of Google's [SwissTable].
|
||||
|
@ -33,13 +33,14 @@
|
||||
/// In other words, if two keys are equal, their hashes must be equal.
|
||||
///
|
||||
///
|
||||
/// It is a logic error for an item to be modified in such a way that the
|
||||
/// item's hash, as determined by the [`Hash`] trait, or its equality, as
|
||||
/// determined by the [`Eq`] trait, changes while it is in the set. This is
|
||||
/// normally only possible through [`Cell`], [`RefCell`], global state, I/O, or
|
||||
/// unsafe code. The behavior resulting from such a logic error is not
|
||||
/// specified (it could include panics, incorrect results, aborts, memory
|
||||
/// leaks, or non-termination) but will not be undefined behavior.
|
||||
/// It is a logic error for a key to be modified in such a way that the key's
|
||||
/// hash, as determined by the [`Hash`] trait, or its equality, as determined by
|
||||
/// the [`Eq`] trait, changes while it is in the map. This is normally only
|
||||
/// possible through [`Cell`], [`RefCell`], global state, I/O, or unsafe code.
|
||||
/// The behavior resulting from such a logic error is not specified, but will
|
||||
/// be encapsulated to the `HashSet` that observed the logic error and not
|
||||
/// result in undefined behavior. This could include panics, incorrect results,
|
||||
/// aborts, memory leaks, and non-termination.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 5d5bbec9b60010dd7389a084c56693baf6bda780
|
||||
Subproject commit f94fa62d69faf5bd63b3772d3ec4f0c76cf2db57
|
Loading…
Reference in New Issue
Block a user