mirror of
https://github.com/Noratrieb/accursed-unutterable-type-id.git
synced 2026-01-14 08:35:02 +01:00
works!
This commit is contained in:
parent
8d11f678c1
commit
efe0592c25
3 changed files with 53 additions and 40 deletions
|
|
@ -1,24 +1,11 @@
|
|||
use accursed_unutterable_type_id::{AccursedUnutterableTypeId, AccursedUnutterablyTypeIdentified};
|
||||
use accursed_unutterable_type_id::AccursedUnutterablyTypeIdentified;
|
||||
|
||||
#[derive(AccursedUnutterablyTypeIdentified)]
|
||||
struct Uwu;
|
||||
|
||||
#[derive(AccursedUnutterablyTypeIdentified)]
|
||||
struct Owo;
|
||||
|
||||
#[derive(AccursedUnutterablyTypeIdentified)]
|
||||
struct Hi;
|
||||
|
||||
#[derive(AccursedUnutterablyTypeIdentified)]
|
||||
struct OhLord;
|
||||
|
||||
fn main() {
|
||||
let uwu_id = AccursedUnutterableTypeId::of::<Uwu>();
|
||||
let owo_id = AccursedUnutterableTypeId::of::<Owo>();
|
||||
let hi_id = AccursedUnutterableTypeId::of::<Hi>();
|
||||
let oh_lord_id = AccursedUnutterableTypeId::of::<OhLord>();
|
||||
|
||||
assert_ne!(uwu_id, owo_id);
|
||||
assert_ne!(owo_id, hi_id);
|
||||
assert_ne!(hi_id, oh_lord_id);
|
||||
struct Uwu<T, const N: usize>
|
||||
where
|
||||
T: 'static,
|
||||
{
|
||||
_x: [T; N],
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue