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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
231 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();
}