Rollup merge of #130118 - RalfJung:unwrap_unchecked, r=Noratrieb

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 #91930, #67441
This commit is contained in:
Matthias Krüger 2024-09-15 11:55:46 +02:00 committed by GitHub
commit e267534b07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,