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
/// This type is only every inhabited when S is nominally equivalent to T | |
#[derive(Debug)] | |
pub struct Is<S, T>(::std::marker::PhantomData<(*const S, *const T)>); | |
// Construct a proof of the fact that a type is nominally equivalent | |
// to itself. | |
pub fn is<T>() -> Is<T, T> { Is(::std::marker::PhantomData) } | |
// std::mem::transmute does not accept unsubstituted type parameters | |
// manual transmute as suggested by manual |