Skip to content

0.2.1

Choose a tag to compare

@dtolnay dtolnay released this 29 Mar 18:25
· 364 commits to master since this release
0.2.1
813bff0
  • Add shorthand for the common case of distributed slices containing function pointers (#27, thanks @ubnt-intrepid)

    use linkme::distributed_slice;
    
    #[distributed_slice]
    pub static BENCHMARKS: [fn(&mut Bencher)] = [..];
    
    // Equivalent to:
    //
    //    #[distributed_slice(BENCHMARKS)]
    //    static _: fn(&mut Bencher) = bench_deserialize;
    //
    #[distributed_slice(BENCHMARKS)]
    fn bench_deserialize(b: &mut Bencher) {
        /* ... */
    }