Created
January 15, 2015 07:38
-
-
Save tomjakubowski/b8b15a1987c21907789c to your computer and use it in GitHub Desktop.
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
#![feature(on_unimplemented)] | |
trait TyEq<T> { } | |
#[rustc_on_unimplemented="{Self} is not type-equal to {T}"] | |
impl<T> TyEq<T> for T { } | |
fn static_assert_ty_eq<T: TyEq<U>, U>() { } | |
fn main(){ | |
static_assert_ty_eq::<u32, i32>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment