nevermore 0.1.1

Derive macros for the bottom type core::convert::Infallible
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![no_std]

use core::convert::Infallible;

fn assert_is_from_infallible<T: From<Infallible>>() {}

#[test]
fn regular_struct() {
    #[derive(nevermore::FromNever)]
    #[allow(dead_code)]
    struct Something {
        foo: &'static str,
        bar: i32,
    }

    assert_is_from_infallible::<Something>();
}