Skip to content

Commit 288cd55

Browse files
committed
use new core unreachable API (fixes #96)
1 parent c0fbc23 commit 288cd55

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/nightly_lazy.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// copied, modified, or distributed except according to those terms.
77

88
extern crate std;
9+
extern crate core;
910

1011
use self::std::prelude::v1::*;
1112
use self::std::sync::Once;
@@ -27,7 +28,7 @@ impl<T: Sync> Lazy<T> {
2728
unsafe {
2829
match self.0 {
2930
Some(ref x) => x,
30-
None => std::mem::unreachable(),
31+
None => core::hint::unreachable_unchecked(),
3132
}
3233
}
3334
}

0 commit comments

Comments
 (0)