Created
June 11, 2019 18:57
-
-
Save DutchGhost/b2bc714b1d267b26b837ff2658c6059d to your computer and use it in GitHub Desktop.
stable unreachable function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![no_std] | |
#[inline] | |
pub const unsafe fn fake_type<T>() -> T { | |
hint_unreachable() | |
} | |
#[inline] | |
pub const unsafe fn hint_unreachable() -> ! { | |
fake_type() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment