Files
rust/tests/ui/iterators/bytes-iterator-clone-12677.rs

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

12 lines
253 B
Rust
Raw Normal View History

2025-07-24 17:22:54 +05:00
//! Regression test for https://github.com/rust-lang/rust/issues/12677
//@ run-pass
fn main() {
let s = "Hello";
let first = s.bytes();
let second = first.clone();
assert_eq!(first.collect::<Vec<u8>>(), second.collect::<Vec<u8>>())
}