rust/tests/ui/for/issue-20605.rs
Michael Goulet 7ff79cf4aa Move test
2023-06-13 21:54:11 +00:00

12 lines
418 B
Rust

// revisions: current next
//[next] compile-flags: -Ztrait-solver=next
fn changer<'a>(mut things: Box<dyn Iterator<Item=&'a mut u8>>) {
for item in *things { *item = 0 }
//~^ ERROR the size for values of type
//[next]~^^ ERROR the type `<_ as IntoIterator>::IntoIter` is not well-formed
//[next]~| ERROR the trait bound `dyn Iterator<Item = &'a mut u8>: IntoIterator` is not satisfied
}
fn main() {}