Skip to content

doc changes: debug assertions -> overflow checks #139447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/core/src/iter/adapters/enumerate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ where
///
/// The method does no guarding against overflows, so enumerating more than
/// `usize::MAX` elements either produces the wrong result or panics. If
/// debug assertions are enabled, a panic is guaranteed.
/// overflow checks are enabled, a panic is guaranteed.
///
/// # Panics
///
Expand Down
10 changes: 5 additions & 5 deletions library/core/src/iter/traits/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ pub trait Iterator {
///
/// The method does no guarding against overflows, so counting elements of
/// an iterator with more than [`usize::MAX`] elements either produces the
/// wrong result or panics. If debug assertions are enabled, a panic is
/// wrong result or panics. If overflow checks are enabled, a panic is
/// guaranteed.
///
/// # Panics
Expand Down Expand Up @@ -931,7 +931,7 @@ pub trait Iterator {
///
/// The method does no guarding against overflows, so enumerating more than
/// [`usize::MAX`] elements either produces the wrong result or panics. If
/// debug assertions are enabled, a panic is guaranteed.
/// overflow checks are enabled, a panic is guaranteed.
///
/// # Panics
///
Expand Down Expand Up @@ -2964,7 +2964,7 @@ pub trait Iterator {
///
/// The method does no guarding against overflows, so if there are more
/// than [`usize::MAX`] non-matching elements, it either produces the wrong
/// result or panics. If debug assertions are enabled, a panic is
/// result or panics. If overflow checks are enabled, a panic is
/// guaranteed.
///
/// # Panics
Expand Down Expand Up @@ -3516,7 +3516,7 @@ pub trait Iterator {
/// # Panics
///
/// When calling `sum()` and a primitive integer type is being returned, this
/// method will panic if the computation overflows and debug assertions are
/// method will panic if the computation overflows and overflow checks are
/// enabled.
///
/// # Examples
Expand Down Expand Up @@ -3550,7 +3550,7 @@ pub trait Iterator {
/// # Panics
///
/// When calling `product()` and a primitive integer type is being returned,
/// method will panic if the computation overflows and debug assertions are
/// method will panic if the computation overflows and overflow checks are
/// enabled.
///
/// # Examples
Expand Down
Loading