mono-macro 0.1.3

Force monomorphizing on functions with `share-generics` to minimalize binary size.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use mono_macro::mono_macro;
#[test]
fn test_trait_method() {
    trait Tr<T> {
        fn foo(&self, _t: T) {}
    }

    struct Foo<'a> {
        t: &'a str,
    }

    impl<'a, T> Tr<T> for Foo<'a> {
        fn foo(&self, _t: T) {}
    }

    mono_macro!(<Foo<'static> as Tr<i32>>::foo);
}