rust/tests/ui/illegal-sized-bound/mutability-mismatch-arg.rs
2024-02-16 20:02:50 +00:00

10 lines
205 B
Rust

//@ run-rustfix
fn test(t: &dyn Iterator<Item=&u64>) -> u64 {
*t.min().unwrap() //~ ERROR the `min` method cannot be invoked on
}
fn main() {
let array = [0u64];
test(&mut array.iter());
}