Skip to content

Commit

Permalink
remove 'const' from 'Option::iter'
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Sep 7, 2024
1 parent 009e738 commit f7d4da6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions library/core/src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1338,9 +1338,8 @@ impl<T> Option<T> {
/// assert_eq!(x.iter().next(), None);
/// ```
#[inline]
#[rustc_const_unstable(feature = "const_option", issue = "67441")]
#[stable(feature = "rust1", since = "1.0.0")]
pub const fn iter(&self) -> Iter<'_, T> {
pub fn iter(&self) -> Iter<'_, T> {
Iter { inner: Item { opt: self.as_ref() } }
}

Expand Down

0 comments on commit f7d4da6

Please sign in to comment.