Clarify what the effects of a 'logic error' are
This commit is contained in:
parent
0cd459fd62
commit
78d919280d
5 changed files with 16 additions and 2 deletions
|
@ -161,7 +161,10 @@ use super::SpecExtend;
|
|||
/// 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 heap. This is normally only possible
|
||||
/// through `Cell`, `RefCell`, global state, I/O, or unsafe code.
|
||||
/// 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, aborts, memory leaks, and non-termination.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
|
|
@ -51,6 +51,9 @@ pub(super) const MIN_LEN: usize = node::MIN_LEN_AFTER_SPLIT;
|
|||
/// 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, but will not result in
|
||||
/// undefined behavior. This could include panics, incorrect results, aborts, memory leaks, and
|
||||
/// non-termination.
|
||||
///
|
||||
/// [`Cell`]: core::cell::Cell
|
||||
/// [`RefCell`]: core::cell::RefCell
|
||||
|
|
|
@ -22,6 +22,9 @@ use super::Recover;
|
|||
/// 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, but will not result in
|
||||
/// undefined behavior. This could include panics, incorrect results, aborts, memory leaks, and
|
||||
/// non-termination.
|
||||
///
|
||||
/// [`Ord`]: core::cmp::Ord
|
||||
/// [`Cell`]: core::cell::Cell
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue