This commit is contained in:
2023-09-22 03:45:53 -04:00
parent c06670e72b
commit ad362d90d5
4 changed files with 124 additions and 138 deletions

11
src/nothing.rs Normal file
View File

@@ -0,0 +1,11 @@
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 }
}