diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 057053297cd2d..6490bffc715f0 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -641,7 +641,7 @@ impl Option { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_stable(feature = "const_option_basics", since = "1.48.0")] pub const fn is_none(&self) -> bool { - !self.is_some() + matches!(*self, None) } /////////////////////////////////////////////////////////////////////////