summaryrefslogtreecommitdiffstats
path: root/tests/ui/iterators/rsplit-clone.rs
blob: 911da742957220f52c25c95a7a3abe3f42ac40f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
// check-pass

// RSplit<T, P> previously required T: Clone in order to be Clone

struct NotClone;

fn main() {
    let elements = [NotClone, NotClone, NotClone];
    let rsplit = elements.rsplit(|_| false);
    rsplit.clone();
}