Last active
June 8, 2020 07:00
-
-
Save badboy/d4f8627a4890ba267c0dbba6444fc9ce to your computer and use it in GitHub Desktop.
This file contains hidden or 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(optin_builtin_traits, negative_impls)] | |
use std::marker::PhantomData; | |
auto trait NotSame{} | |
impl<A> !NotSame for (A, A) {} | |
struct Is<S, T>(PhantomData<(S,T)>); | |
impl<S,T> Is<S,T> where (S,T): NotSame { | |
fn absurd(&self) { | |
} | |
} | |
fn main() { | |
let t : Is<u32, u32> = Is(PhantomData); | |
//t.absurd(); | |
let z : Is<u32, i32> = Is(PhantomData); | |
z.absurd(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment