dyn-slice 3.2.2

&dyn [Trait] implementation, inspired by a Reddit thread.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
// Make sure that references from iterators from dyn slices do
// not live longer than the underlying slice / array

use dyn_slice::standard::borrow;

fn main() {
    let _ = {
        let array_1 = [1, 2, 3, 4, 5];
        let slice_1 = borrow::new(&array_1);
        slice_1.iter().next().unwrap()
    };
}