Skip to content

Instantly share code, notes, and snippets.

@DutchGhost
Created June 11, 2019 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DutchGhost/b2bc714b1d267b26b837ff2658c6059d to your computer and use it in GitHub Desktop.
Save DutchGhost/b2bc714b1d267b26b837ff2658c6059d to your computer and use it in GitHub Desktop.
stable unreachable function
#![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