rust/tests/ui/for/issue-20605.rs

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

11 lines
312 B
Rust
Raw Normal View History

2023-06-01 22:26:14 -05:00
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
2023-12-14 06:11:28 -06:00
//@[next] compile-flags: -Znext-solver
2023-06-01 22:26:14 -05:00
fn changer<'a>(mut things: Box<dyn Iterator<Item=&'a mut u8>>) {
for item in *things { *item = 0 }
2024-10-14 12:04:10 -05:00
//~^ ERROR `dyn Iterator<Item = &'a mut u8>` is not an iterator
2023-06-01 22:26:14 -05:00
}
fn main() {}