mirror of
https://git.intege.rs/xlib/anything
synced 2025-12-05 20:35:02 +00:00
11 lines
230 B
Rust
11 lines
230 B
Rust
|
|
pub auto trait NotNothing {}
|
|
impl !NotNothing for Nothing {}
|
|
impl <T> NotNothing for alloc::boxed::Box<T> {}
|
|
|
|
#[derive(Debug)]
|
|
pub struct Nothing;
|
|
|
|
impl<T: NotNothing> From<T> for Nothing {
|
|
fn from(_: T) -> Self { Nothing }
|
|
} |