We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a646c91 commit 11341e2Copy full SHA for 11341e2
src/libcore/option.rs
@@ -146,7 +146,7 @@
146
#![stable(feature = "rust1", since = "1.0.0")]
147
148
use iter::{FromIterator, FusedIterator, TrustedLen};
149
-use {mem, ops};
+use {hint, mem, ops};
150
use mem::PinMut;
151
152
// Note that this is not a lang item per se, but it has a hidden dependency on
@@ -784,7 +784,7 @@ impl<T> Option<T> {
784
785
match *self {
786
Some(ref mut v) => v,
787
- _ => unreachable!(),
+ None => unsafe { hint::unreachable_unchecked() },
788
}
789
790
@@ -817,7 +817,7 @@ impl<T> Option<T> {
817
818
819
820
821
822
823
0 commit comments