rust/tests/ui/iterators/rsplit-clone.rs

12 lines
230 B
Rust
Raw Normal View History

// 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();
}