Skip to content

Commit

Permalink
Rollup merge of rust-lang#130118 - RalfJung:unwrap_unchecked, r=Norat…
Browse files Browse the repository at this point in the history
…rieb

move Option::unwrap_unchecked into const_option feature gate

That's where `unwrap` and `expect` are so IMO it makes more sense to group them together.

Part of rust-lang#91930, rust-lang#67441
  • Loading branch information
matthiaskrgr authored Sep 15, 2024
2 parents 011289c + 7ec01e4 commit e267534
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ impl<T> Option<T> {
#[inline]
#[track_caller]
#[stable(feature = "option_result_unwrap_unchecked", since = "1.58.0")]
#[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
#[rustc_const_unstable(feature = "const_option", issue = "67441")]
pub const unsafe fn unwrap_unchecked(self) -> T {
match self {
Some(val) => val,
Expand Down

0 comments on commit e267534

Please sign in to comment.